个人遇见问题记录
~鹏
这个作者很懒,什么都没留下…
展开
-
解决3 字节的 UTF-8 序列的字节 3 无效问题
问题描述org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from relative location [spring-dao.xml]Offending resource: class path resource [applicationContext.xml]; nested excepti原创 2022-04-16 22:10:09 · 1724 阅读 · 0 评论 -
初学整合Spring和Mybatis时Caused by: java.lang.IllegalArgumentException: Mapped Statements collection报错
项目场景:初学者整合Spring和Mybatis时可能出现的报错问题描述Caused by: java.lang.IllegalArgumentException: Mapped Statements collection原因分析及解决方案:初学整合Spring和Mybatis时,由于mapper既可以在Mybatis的核心配置文件中绑定,也可以在Spring的配置文件中绑定,初学尝试两种方法时可能会出现在两边同时绑定了一个mapper的情况,就会出现上述报错,只需要选择在一个配置文件中绑定原创 2022-04-13 22:13:41 · 559 阅读 · 0 评论 -
学习DI注入时遇见的一个Error creating bean with name ‘xxx‘ defined in class path resource [beans.xml]报错
问题描述Error creating bean with name ‘xxx’ defined in class path resource [beans.xml]: Unsatisfied dependency expressed through constructor parameter 1: Ambiguous argument values for parameter of type [int] - did you specify the correct bean references as ar原创 2022-04-13 21:58:55 · 2044 阅读 · 0 评论 -
JSON乱码问题
项目场景:Spring MVC中,返回给页面的JSON格式数据中有中文的情况问题描述返回的数据在页面中显示会出现乱码的情况`原本的中文字在页面当中变成了问号解决方案:方法一:在@RequestMapping注解中设置编码格式@RequestMapping(value = "/jsonTest",produces = "application/json;charset=utf-8")方法二(统一解决):在项目中Spring MVC的配置文件中加入以下配置<!--JSON乱码问题配原创 2022-04-13 15:55:46 · 464 阅读 · 0 评论