老师,我在数据持久化到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
请问一下这个怎么解决的,我也遇到这个问题了
032019-12-12 -
老卫
2019-03-27
目测是驱动或者程序的或者是数据库本身版本的问题。
请把版本保持一致。 https://www.imooc.com/article/3897500
基于Spring Boot技术栈博客系统企业级前后端实战
1296 学习 · 738 问题
相似问题