我一直启动不了springboot

来源:1-5 快速入门小例子

weixin_慕慕9399236

2020-08-24 18:29

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'houseMapper' defined in file [E:\java\first\target\classes\com\mp\dao\HouseMapper.class]: Unsatisfied dependency expressed through bean property 'sqlSessionFactory'; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'sqlSessionFactory' defined in class path resource [com/baomidou/mybatisplus/autoconfigure/MybatisPlusAutoConfiguration.class]: Unsatisfied dependency expressed through method 'sqlSessionFactory' 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$Hikari.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.zaxxer.hikari.HikariDataSource]: Factory method 'dataSource' threw exception; nested exception is java.lang.IllegalStateException: Cannot load driver class: com.mysql.cj.jdbc.Driver

写回答 关注

2回答

  • 老猿
    2020-08-30 18:29:25

    是不是数据源配置错了,你可以把配置信息粘贴出来看看。

  • 慕娘1392625
    2020-08-26 17:25:09

    看下你的mavenjar包 是不是版本不一致  项目名下有个library看下mybatisplus的几个jar包版本是否一致

MyBatis-Plus入门

MyBatis-Plus框架入门必学课程!

56140 学习 · 381 问题

查看课程

相似问题