填坑
lizz666
不积跬步无以至千里
展开
-
Spring JdbcTemplate异常:EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0
现象在Spring框架中使用JdbcTemplate.query返回空对象org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 at org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java:97) at org.springfr.原创 2021-10-23 18:22:00 · 942 阅读 · 0 评论 -
Spring Jdbc异常:IncorrectResultSetColumnCountException: Incorrect column count: expected 1, actual 2
现象在Spring框架中使用JdbcTemplate.queryForList返回自定义对象org.springframework.dao.EmptyResultDataAccessException: Incorrect result size: expected 1, actual 0 at org.springframework.dao.support.DataAccessUtils.nullableSingleResult(DataAccessUtils.java:97) at org原创 2021-10-23 17:57:33 · 4841 阅读 · 0 评论 -
fastjson使用toJavaObject序列化方法无法序列化JSONField注解字段问题
现象使用JSON.toJavaObject序列化@JSONField字段无法赋值的,出版版本fastjson-1.2.71以后。测试代码如下: @Test public void JsonTest() { Map<String,String> map = new HashMap(); map.put("testVal","1122"); JSON json = (JSON) JSON.toJSON(map);原创 2021-10-23 10:46:46 · 2025 阅读 · 3 评论 -
SPI服务发现机制没有生效原因分析
现象原创 2021-06-18 18:43:49 · 2605 阅读 · 6 评论 -
idea中子模块无法识别为maven模块
现象原创 2021-06-18 11:18:58 · 1867 阅读 · 2 评论 -
java.lang.IllegalStateException: Cannot call sendError() after the response has been committed
现象实现execl导出功能时出现Cannot call sendError() after the response has been committed异常2021-05-17 17:46:50.817 WARN 6932 --- [nio-8080-exec-1] .w.s.m.s.DefaultHandlerExceptionResolver : Failure while trying to resolve exception [org.springframework.http.conv原创 2021-05-17 17:54:29 · 932 阅读 · 0 评论 -
bootstrap.yml无法加载
现象在spring boot项目中加载bootstrap.yml配置我们可以看到在idea中bootstrap.yml文件的格式yml,这样的标识无法启动时加载。分析无法加载的原因是因为bootstrap.yml配置是spring cloud中带有的功能,当你只适用了springboot组件启动项目时,是无法自动加载的。解决方案方案一在项目引入spring-cloud-context组件 <dependency> <原创 2021-05-11 11:30:33 · 4322 阅读 · 0 评论