![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
开发错误总结
马匠
耐得住寂寞,守得住繁华
展开
-
Lombok @Data和@Builder一起使用时报错
Lombok @Data和@Builder一起使用时报错错误解决方法lombok常用注解错误有时为了在构造po类时,代码更优雅,会在po类加入@Builder注解,但因为@Builder和@Data一起使用时会将类的无参构造方法覆盖掉,会导致使用一些框架操作数据库时不能成功地将数据赋值给po类,例如myBatis。解决方法在类中重写无参构造方法,防止与lombok的注解冲突,在无参构造方法...原创 2019-07-02 17:57:11 · 8542 阅读 · 0 评论 -
Swagger UI中文乱码解决(IDEA)
1、file --> Settings --> file encodings如图 都设置为UTF-8 然后重启项目 一般即可解决如不成功 请留意启动项目时Messages中是否有这样一句话:Information:java: Multiple encodings set for module chunk platf “GBK” will be used by ...原创 2019-07-10 10:37:47 · 5662 阅读 · 0 评论 -
Intellij IDEA运行报Command line is too long解法
原文:https://blog.csdn.net/ZXJ_1223/article/details/80611089报错内容:Error running ‘ServiceStarter’: Command line is too long. Shorten command line for ServiceStarter or also for Application default confi...转载 2019-07-10 11:00:23 · 386 阅读 · 0 评论 -
mysql保存数据提示:Out of range value for column错误
错误原因:传入参数超出数据库字段设置最大值 在数据库中修改即可mysql的基本数据类型里几个int长度如下:类型大小范围(有符号)范围(无符号)用途TINYINT1字节(-128,127)(0,255)小整数值SMALLINT2字节(-32 768,32 767)(0,65 535)大整数值MEDIUMINT3字节(-8 388 ...原创 2019-07-10 11:12:45 · 2186 阅读 · 0 评论 -
mybatis执行批量更新batch update 的方法(MySQL Oracle)
原文链接:https://my.oschina.net/likaixuan0/blog/1476939?nocache=1534325677468oracle数据库:<update id="batchUpdate" parameterType="java.util.List"> <foreach collection="list" item="item" in...转载 2019-07-10 15:20:29 · 597 阅读 · 0 评论 -
JAVA foreach和普通for循环是否需要判断为null
原文:https://blog.csdn.net/u014079773/article/details/52693539测试增强for循环是否需要判断为null例1:public static void main(String[] args) { List<Object> list = null; for(Object s : list){ ...转载 2019-07-17 17:34:28 · 591 阅读 · 0 评论