当前位置:   article > 正文

mybatis-plus报错Error creating bean with name ‘dataSourceScriptDatabaseInitializer‘_error creating bean with name 'datasourcescriptdat

error creating bean with name 'datasourcescriptdatabaseinitializer' defined

mybatisplus在本地做测试的时候,启动就报错:Error creating bean with name 'dataSourceScriptDatabaseInitializer' ..... Error creating bean with name 'spring.sql.init-org.springframework.boot.autoconfigure.sql.init.SqlInitializationProperties': Lookup method resolution failed;

我的pom文件

  1. <dependencies>
  2. <dependency>
  3. <groupId>org.postgresql</groupId>
  4. <artifactId>postgresql</artifactId>
  5. <version>42.2.20</version>
  6. </dependency>
  7. <dependency>
  8. <groupId>com.baomidou</groupId>
  9. <artifactId>mybatis-plus-boot-starter</artifactId>
  10. <version>3.5.1</version>
  11. </dependency>
  12. <dependency>
  13. <groupId>org.mybatis.spring.boot</groupId>
  14. <artifactId>mybatis-spring-boot-starter</artifactId>
  15. <version>2.2.2</version>
  16. </dependency>
  17. <dependency>
  18. <groupId>org.projectlombok</groupId>
  19. <artifactId>lombok</artifactId>
  20. <version>1.18.20</version>
  21. </dependency>
  22. <!-- https://mvnrepository.com/artifact/junit/junit -->
  23. <dependency>
  24. <groupId>junit</groupId>
  25. <artifactId>junit</artifactId>
  26. <version>4.12</version>
  27. <scope>test</scope>
  28. </dependency>
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-test</artifactId>
  32. <version>2.4.5</version>
  33. </dependency>
  34. </dependencies>

这里为什么报错呢?是因为jar包冲突问题,mybatis-plus-boot-starter  和 

mybatis-spring-boot-starter  版本有冲突,我上面贴的是正确的,我原来的mybatis-spring-boot-starter版本是2.2.0, 反正有冲突,改一下就好了,就没有报错了。

临时写的,比较潦草,如果解决了你的问题,别忘了点个赞哦,多谢!!!

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/559645?site
推荐阅读
相关标签
  

闽ICP备14008679号