1.错误
Error creating bean with name ‘stuController’: Unsatisfied dependency expressed through field ‘stuService’; nested exception is org.springframework.beans.factory:
解决方法:
添加依赖:
<dependency>
<groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.9</version>
</dependency>
2.错误
2021-11-28 14:24:10.661 ERROR 4136 --- [reate-942444738] com.alibaba.druid.pool.DruidDataSource : create connection SQLException, url: jdbc:mysql://localhost:3306/spring?characterEncoding=utf-8&useSSL=false&allowPublicKeyRetrieval=true, errorCode 0, state 01S00
解决方法:
在数据库连接地址后面加上 :&serverTimezone=UTC