- 博客(6)
- 收藏
- 关注
原创 The server time zone value ‘�й���ʱ��‘ is unrecognized or represents more than one time zone。
Mysql连接:The server time zone value '�й���ʱ��' is unrecognized or represents more than one time zone。 简单的解决办法: 创建数据库连接好似jdbc:mysql:///3306/demo------>jdbc:mysql:///3306/demo?serverTimezone=UTC 根本解决: 找到配置文件的位置:SELECT @@datadir; ..
2020-11-18 18:07:57
301
原创 springboot配置数据源时,driver-class-name: com.mysql.jdbc.Driver标红?
问题:springboot配置数据源时,driver-class-name: com.mysql.jdbc.Driver标红? datasource: driver-class-name: com.mysql.jdbc.Driver url: jdbc:mysql://localhost:3306/springboot_test username: root password: root 解决方法:是否配置mysql依赖 <dependency>
2020-10-22 15:02:56
3152
1
原创 SpringBoot中@Autowired自动注入时,mapper标红,
问题:SpringBoot中,service层使用@Autowired自动注入时,mapper标红 一.为什么会标红? 我们使用的@Mapper和@MapperScan并不是spring框架的注解,未在spring容器中注册为bean; 解决方法: 使用@Resource代替@Autowired注解,根据类型注入改为根据名称注入; 将注解@Autowired 改为(@Autowired(required = false)),表示注入时,自动注入的类为非必须; @Autowired(r
2020-10-22 14:54:48
2035
1
原创 SSM框架中出现的各种乱码问题
1.返回给前端的字符是??,乱码 在springMVC配置文件中加入 <mvc:annotation-driven > <mvc:message-converters register-defaults="true"> <bean class="org.springframework.http.converter.StringHttpMessageConverter" > <prop..
2020-10-19 16:16:12
378
1
原创 Neither GenericXmlContextLoader nor AnnotationConfigContextLoader was able to load an ApplicationCon
在moven上部署spring,mybatis时, 控制台报:Caused by: java.lang.IllegalStateException: Neither GenericXmlContextLoader nor AnnotationConfigContextLoader was able to load an ApplicationContext from 解决方法:检查Test类中@RunWith下方是否写 @ContextConfiguration("classpath:Applic.
2020-10-09 10:36:46
4451
原创 moven 部署Sping与mybatis时,Mapped Statements collection does not contain value for Xxxxxxxx
控制台报错:java.lang.IllegalArgumentException: Mapped Statements collection does not contain value for Xxxxxxxx 可能问题为: mapper中方法命名与dao中的方法名不一致, 使用注解版时,检查注解中方法命是否出现与dao方法名不一致的错误。如下图中检查@Many中引用的方法与dao层方法名是否一致。 @Select("select * from prov") @Results(
2020-10-09 10:30:02
146
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人