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

蓝咒 提交于 2020-05-01 07:06:34

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报错,可以关闭错误提示或者注解忽略




易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!