![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
java
nreg
这个作者很懒,什么都没留下…
展开
-
HttpMessageNotWritableException: No converter for [class com.xxx.Xxx] with preset Content-Type ‘null
org.springframework.http.converter.HttpMessageNotWritableException: No converter for xxx with preset Content-Type 'null'原创 2023-05-27 11:50:03 · 5745 阅读 · 0 评论 -
Cannot convert string ‘\xAC\xED\x00\x05sr...‘ from binary to utf8mb4
Cannot convert string '\xAC\xED\x00\x05sr...' from binary to utf8mb4原创 2022-09-21 13:27:33 · 7816 阅读 · 1 评论 -
继承 WebMvcConfigurerAdapter 和 WebMvcConfigurationSupport 的区别
spring 5.0 之前,配置类继承WebMvcConfigurerAdapter,如果加@EnableWebMvc注解,则为全面接管SpringMVC,否则为自定义扩展配置spring 5.0 之后,全面接管SpringMVC,需要继承WebMvcConfigurationSupport,而自定义扩展配置则需要实现WebMvcConfigurer接口...原创 2022-06-16 10:02:52 · 1016 阅读 · 0 评论 -
org.springframework.transaction.CannotCreateTransactionException: Could not open Hibernate Session f
报错原因:web.xml中加入了以下代码: <!--事物开启到视图层 --><filter> <filter-name>SpringOpenSessionInViewFilter</filter-name> <filter-class>org.springframework.orm.hibernate5.support.OpenSessionInViewFilter</filter-class&...原创 2021-07-30 16:23:18 · 598 阅读 · 0 评论 -
获取List集合中最大的日期时间
导包:import java.util.*;List集合:List<Date> lds = new ArrayList<>();取该集合中的最大日期:Date maxDate = Collections.max(lds);参考:https://blog.csdn.net/weixin_33587731/article/details/114805426原创 2021-05-25 19:27:18 · 4574 阅读 · 0 评论 -
判断文件是否写入完毕
情景:用sqlldr导入数据入库时会产生一些日志,在入库未完成时,日志是大小为0的空文件,能通过日志大小判断是否入库完成/** * 等待文件有数据且已写完 * 费时操作 放在子线程中执行 * * @param file 文件 * @param start 需要传入 System.currentTimeMillis(),用于兼容遍历的情况 * @return true:已写完 false:外部程序阻塞或者文件不存在 */ p原创 2021-04-22 00:35:19 · 1753 阅读 · 2 评论