老师,我在数据持久化到mysql时出现问题,该怎么解决啊

来源:6-7 -持久化数据到MySQL

qq_慕码人5167370

2019-03-27

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name ‘org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration’: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘dataSource’ defined in class path resource [org/springframework/boot/autoconfigure/jdbc/DataSourceConfiguration$Tomcat.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.apache.tomcat.jdbc.pool.DataSource]: Factory method ‘dataSource’ threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver

写回答

2回答

慕后端3237999

2019-12-11

请问一下这个怎么解决的,我也遇到这个问题了

0
3
老卫
回复
慕后端3237999
嗯,请采纳答案,关闭问题
2019-12-12
共3条回复

老卫

2019-03-27

目测是驱动或者程序的或者是数据库本身版本的问题。
请把版本保持一致。  https://www.imooc.com/article/38975

0
0

基于Spring Boot技术栈博客系统企业级前后端实战

毕设 Elasticsearch搜索+Thymeleaf模板+JPA+Security+BootStrap

1296 学习 · 738 问题

查看课程