- 博客(5)
- 收藏
- 关注
原创 处理接收前台日期字串到后端Date字段时报错Failed to convert property value of type 'java.lang.String' to required type '
Failed to convert property value of type 'java.lang.String' to required type 'java.util.Date' for property 'dateExpire'; nested exception is org.springframework.core.convert.ConversionFailedExceptio...
2019-03-19 16:48:38 7637
原创 thymeleaf:如何在引入fragment时保留部分差异内容(保留原内容)
应用场景:同一工程里不同页面所需使用的script文件和css文件大同小异,若每页都写一遍,修改时成本很高,故设置一公共的head文件,再导入它。thymeleaf使用fragment语法进行导入。使用简介如下:定义公共fragment:<footer th:fragment="copy"> the content of footer </footer&...
2019-03-18 23:37:52 1680
原创 Thymeleaf中的日期格式化处理,使用内置对象
<td th:text="${#dates.format(contractInfo.datePostpone, 'yyyy-MM-dd')}"></td>其中的#dates是thymeleaf的内置工具对象。dates: methods for java.util.Date objects: formatting, component extraction, et...
2019-03-09 23:05:01 4209
原创 Spring boot 使用Druid环境启动初次查询都会报警告和错误的处理
Spring boot 使用Druid,环境启动初次查询都会报如下警告和错误。Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the ...
2019-03-09 22:52:33 1612
原创 ObjectMapper忽略未知字段
ObjectMapper objectMapper = new ObjectMapper();objectMapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
2019-03-09 12:44:46 6507
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人