
填坑
日常踩坑记录
蓝色的蓝i
这个作者很懒,什么都没留下…
展开
-
Lombok使用
以下文章来源于Java中文社群,作者老王https://mp.weixin.qq.com/s/pClYUnpgjP-Le8hQw_lYjQLombok 所有注解如下: val:用在局部变量前面,相当于将变量声明为 final; @NonNull:给方法参数增加这个注解会自动在方法内对该参数进行是否为空的校验,如果为空,则抛出 NPE(NullPointerExcep...转载 2020-03-31 21:33:14 · 118 阅读 · 0 评论 -
mybatis-plus 配置文件
mybatis-plus: # 如果是放在src/main/java目录下 classpath:/com/yourpackage/*/mapper/*Mapper.xml # 如果是放在resource目录 classpath:/mapper/*Mapper.xml mapper-locations: classpath:/mapper/*Mapper.xml #实体扫描,多个pa...原创 2020-01-16 14:13:00 · 4545 阅读 · 0 评论 -
StringUtils
http://commons.apache.org/proper/commons-lang/javadocs/api-release/src-html/org/apache/commons/lang3/StringUtils.htmlpublic static boolean isEmpty(CharSequence cs)常用函数之一,判断字符串是否为""或者nullStringUti...转载 2020-03-19 18:12:31 · 163 阅读 · 0 评论 -
validation 常用注解
JSR提供的校验注解: @Null 被注释的元素必须为 null @NotNull 被注释的元素必须不为 null @AssertTrue 被注释的元素必须为 true @AssertFalse 被注释的元素必须为 false @Min(value) 被注释的元素必须是一个数字,其值必须大于等于指定的最小值 ...原创 2019-09-17 14:45:52 · 1640 阅读 · 0 评论 -
poi 3.17 导出excel
package Utils;import org.apache.poi.ss.usermodel.*;import org.apache.poi.xssf.usermodel.*;/** * cellstyle工具类 poi版本3.17 * auth lancx * since 2019-9-10 */public class CellStyleTool { /**...原创 2019-09-11 00:01:58 · 428 阅读 · 0 评论 -
springboot @EnableScheduling 定时任务
相应类上添加注解@EnableScheduling或者正在启动类上使用需要执行定时任务的方法上添加@Scheduled注解了,前提条件是该方法不能有参数;测试方法@Scheduled(cron = "0/5 * * * * ?") public void test(){ System.out.println("hhhhh"); }通过数据库查询cron表达...原创 2019-07-24 19:20:37 · 223 阅读 · 0 评论 -
mysql 5.7 ORDER BY 与 GROUP BY 同时使用
需求:查询每一条product_basic_info_id 下最大的 validity_date表结构如下:sql_1SELECT product_report.id, product_report.product_basic_info_id, product_report.batch, product_report.remark, product_report.validity...原创 2019-12-14 16:09:01 · 769 阅读 · 1 评论 -
js 获取项目名
https://blog.youkuaiyun.com/qq_23521659/article/details/80618105//js获取项目根路径,如: http://localhost:8080/SLSaleSystemfunction getRootPath(){ //获取当前网址,如: http://localhost:8080/SLSaleSystem/pages/index.jsp...转载 2019-07-17 19:40:33 · 214 阅读 · 0 评论 -
Class path contains multiple SLF4J bindings和日志中文乱码
1.Class path contains multiple SLF4J bindings问题描述SLF4J: Class path contains multiple SLF4J bindings.SLF4J: Found binding in [jar:file:/C:/Users/trich/.m2/repository/org/apache/logging/log4j/log4j-s...原创 2019-07-17 19:35:39 · 198 阅读 · 0 评论 -
mybatisplus踩坑
报错:Caused by: org.apache.ibatis.builder.BuilderException: Error evaluating expression ‘ew.sqlSegment != null and ew.sqlSegment != ‘’ and ew.nonEmptyOfWhere’. Cause: org.apache.ibatis.ognl.OgnlExcept...原创 2020-02-28 14:37:02 · 2750 阅读 · 0 评论 -
mybatis 替换为mybatis-plus 调用BaseMapper出现Invalid bound statement (not found)错误
mybatis-plus 可以直接通过yml文件中mybatis-plus.mapper-locations设置mapper文件地址mybatis-plus: mapper-locations: classpath*:com/example/mybatisplus/demo/mapper/xml/*.xml如果在config类中配置则需要注意mybatis-plus与mybatis的不同...原创 2020-01-16 18:59:09 · 6456 阅读 · 3 评论