
JavaEE开发
Haven.Liu
龙七
展开
-
redis cli命令
redis cli命令原创 2022-10-14 14:46:06 · 299 阅读 · 0 评论 -
LayUI前端开发实战记录
一、使用弹出框完成页面遮罩layer.msg('加载中......', {icon: 16, shade: [0.5, '#f5f5f5'], scrollbar: false, offset: 'auto', time: 2000});二、弹出框设置显示时间layer.msg('修改成功!',{time:500});三、时间控件一)只可选择分秒【时间格式:mm:ss...原创 2019-11-20 17:51:04 · 804 阅读 · 0 评论 -
javaEE:获取用户IP
/** * 获取用户真实IP地址,不使用request.getRemoteAddr();的原因是有可能用户使用了代理软件方式避免真实IP地址, * 如果通过了多级反向代理的话,X-Forwarded-For的值并不止一个,而是一串IP值,所以取X-Forwarded-For中第一个非unknown的有效IP字符串。 * * 如:X-Forwarded-For:192.168.1.110,...原创 2018-05-29 15:56:20 · 846 阅读 · 0 评论 -
Swagger生产环境禁用的两种方式
第一种:在swagger配置类中添加注解:@Profile({"dev","test"}) 如图补充,maven动态切换项目环境:https://blog.youkuaiyun.com/LiuKingJia/article/details/89878905方法二:在配置类中用注解:@ConditionalOnProperty(prefix = "swagger2",va...原创 2019-05-06 11:29:16 · 6970 阅读 · 0 评论 -
JavaEE:Maven动态切换多profiles编译环境
第一步:配置maven父pom profiles环境:<build> <plugins> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-...原创 2019-05-06 11:51:57 · 1146 阅读 · 0 评论 -
mysql-connector-java和MySQL兼容问题:Caused by: java.sql.SQLException: Unknown system variable 'language'
搭建的老框架:spring 4 +Mybatis 3 + MySql(老服务器版本:5.0.8)报错截图:### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Could not get JDBC Connection; nested except...原创 2019-05-15 15:27:43 · 1330 阅读 · 0 评论 -
SpringBoot:上传文件(图片、语音)到本地服务器方案
上代码:一、Controller层:@ApiOperation("上传作品图片")@PostMapping(value = "uploadCalligraphy")public String uploadFile(MultipartFile[] multipartFiles){ if(multipartFiles == null){ return Resul...原创 2019-07-17 19:02:27 · 2106 阅读 · 0 评论