上一页 1 ··· 5 6 7 8 9 10 11 12 下一页
摘要: 下载了最新的JUnit4版本,是4.13.2,结果尝试使用发现总是报java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing这样的错误, 一般的解决方案是,换一个低一点的版本就好了 还有人说,是缺少hamcrest的包。去官网又看了一下, 阅读全文
posted @ 2022-04-18 16:44 培轩 阅读(308) 评论(0) 推荐(0)
摘要: 只是记录一下,没有彻底解决这个问题。 出现这个问题的场景是这样的:使用Druid的DataSource然后通用自己定制的代码重新在Spring中注册了一下,然后访问数据库的DAO就出现了datasource already closed. 找到这样的一篇网文(https://blog.csdn.ne 阅读全文
posted @ 2022-02-25 22:42 培轩 阅读(3849) 评论(0) 推荐(0)
摘要: InputStream in = SimplePropertiesUtil.class.getClassLoader().getResourceAsStream(propertiesName); 这条语句已经运行过没有问题,但是有时会出现NPE,提示inStream parameter is nul 阅读全文
posted @ 2022-02-18 23:09 培轩 阅读(774) 评论(0) 推荐(0)
摘要: 在使用SpringBoot开发中经常使用配置文件来定义应用需要的数据项,例如数据字典,开始使用properties,然后使用XML,现在常使用YML 使用Properties格式没有层次,XML格式解析麻烦,编写复杂,YML简洁有层次应用快捷。于是在开发中使用YML定义如下数据项 data: dic 阅读全文
posted @ 2022-02-16 22:57 培轩 阅读(191) 评论(0) 推荐(0)
摘要: https://stackoverflow.com/questions/67775360/springboot-insufficient-memory-for-the-java-runtime-environment SpringBoot insufficient memory for the Ja 阅读全文
posted @ 2022-02-11 10:44 培轩 阅读(47) 评论(0) 推荐(0)
摘要: 在使用SELECT查询时IN比OR的效率好。那么在Spring中如何使用IN()呢? 这是我原来的使用方式,用字符串拼接: StringBuilder buf = new StringBuilder("SELECT name FROM pos_user WHERE id IN ("); // ids 阅读全文
posted @ 2022-02-07 15:46 培轩 阅读(1224) 评论(0) 推荐(0)
摘要: https://c.runoob.com/front-end/854/ ****菜鸟工具**** 正则表达式在线测试 在线Java正则表达式测试 https://www.stackoverflow.wiki/tools/reg.jsp 常用正则表达式收集: 一、校验数字的表达式 数字:^[0-9]* 阅读全文
posted @ 2022-02-06 22:24 培轩 阅读(3874) 评论(0) 推荐(0)
摘要: FreeMarker 简介 http://www.freemarker.net/ FreeMarker官方网站:https://freemarker.apache.org FreeMarker中文官方参考手册:http://freemarker.foofun.cn/ 阅读全文
posted @ 2022-02-02 12:13 培轩 阅读(82) 评论(0) 推荐(0)
摘要: enum的字段,在插入的时候,必须带上引号。否则会出现不可预期的问题 ENUM枚举 一般不建议使用,后期不便于扩展。任何不在枚举的范围的值插入都会报错,一般用tinyint替代ENUM比较合适。 ENUM的字段值不区分大小写。如insert into tb1 values("M"); 和insert 阅读全文
posted @ 2022-01-28 22:04 培轩 阅读(1249) 评论(0) 推荐(0)
摘要: https://blog.csdn.net/qq_35387940/article/details/104629558 private List<Object> arrayUnshift(List<Object> list, Object[] args) { List<Object> newList 阅读全文
posted @ 2022-01-25 21:43 培轩 阅读(456) 评论(0) 推荐(0)
上一页 1 ··· 5 6 7 8 9 10 11 12 下一页