java mybatis入门程序报错java.lang.IllegalStateException: Failed to load ApplicationContext

java.lang.IllegalStateException: Failed to load ApplicationContext

Caused by: java.lang.IllegalArgumentException: Unable to instantiate org.mybatis.spring.boot.autoconfigure.MybatisDependsOnDatabaseInitializationDetector [org.springframework.boot.sql.init.dependency.DependsOnDatabaseInitializationDetector]
解决办法就是pom.xml文件依赖配置

  
            org.mybatis.spring.boot
            mybatis-spring-boot-starter
            3.0.2
  

版本号改成2.2.2后刷新即可!

  
            org.mybatis.spring.boot
            mybatis-spring-boot-starter
            2.2.2
  

你可能感兴趣的:(SpringBoot,mybatis)