Idea下的springboot mysql8.0等报错解决随笔

cannot load jdbc class path:mysql8.0装载失败,可能原因,驱动名称错误,连接字符串中需要加入时区UTC,否则8.0一定会报错无法连接,关闭SSL

在application.yml中spring :

datasource:
    url: jdbc:mysql:///springboot_test?serverTimezone=UTC&characterEncoding=utf8&useUnicode=true&useSSL=false
    username: root
    password: an951753
    driver-class-name: com.mysql.cj.jdbc.Driver

页面无法加载:

映射
@Autowired出错: 直接忽略即可,项目一样可以运行
如下
@Autowired
    StudentMapper mapper;

mapper报错,可以关闭错误提示或者注解忽略




posted @ 2018-07-13 17:43  AirNess  阅读(352)  评论(0编辑  收藏  举报