当前位置:   article > 正文

关于Springboot2.0整合mybatisplus2.*到3.*遇到的坑_could not find com.baomidou:mybatisplus-spring-boo

could not find com.baomidou:mybatisplus-spring-boot-starter:15.1

因为一直要用自动生成策略所以包出问题了,各种杂包这个MP核心库根本不需要我们关心,springboot已经提供了一个整合不要导入这个包做个就是整合包但是版本一定要兼最新用了mybatis-plus-boot这个包之后其他的包基本上不需要了爬过的坑用了两个小时解决,在我们初级创建的时候不要勾选mybatis我们不需要mybatis包直接跳过,在后面通过Maven 进行添加

贴一个Maven的配置

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>2.1.4.RELEASE</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>tt</groupId>
  12. <artifactId>springboot_mybatis_layfenye</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>springboot_mybatis_layfenye</name>
  15. <description>Demo project for Spring Boot</description>
  16. <properties>
  17. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  18. <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
  19. <java.version>1.8</java.version>
  20. </properties>
  21. <dependencies>
  22. <dependency>
  23. <groupId>org.springframework.boot</groupId>
  24. <artifactId>spring-boot-starter-jdbc</artifactId>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.springframework.boot</groupId>
  32. <artifactId>spring-boot-starter-web</artifactId>
  33. </dependency>
  34. <!-- mybatis-plus-->
  35. <dependency>
  36. <groupId>com.baomidou</groupId>
  37. <artifactId>mybatis-plus-boot-starter</artifactId>
  38. <version>3.1.1</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>mysql</groupId>
  42. <artifactId>mysql-connector-java</artifactId>
  43. <scope>runtime</scope>
  44. </dependency>
  45. <dependency>
  46. <groupId>org.projectlombok</groupId>
  47. <artifactId>lombok</artifactId>
  48. <optional>true</optional>
  49. </dependency>
  50. <!--自动递增-->
  51. <dependency>
  52. <groupId>com.baomidou</groupId>
  53. <artifactId>mybatis-plus-generator</artifactId>
  54. <version>3.1.1</version>
  55. </dependency>
  56. <!-- 模板 -->
  57. <dependency>
  58. <groupId>org.apache.velocity</groupId>
  59. <artifactId>velocity-engine-core</artifactId>
  60. <version>2.1</version>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.springframework.boot</groupId>
  64. <artifactId>spring-boot-starter-test</artifactId>
  65. <scope>test</scope>
  66. </dependency>
  67. </dependencies>
  68. <build>
  69. <plugins>
  70. <plugin>
  71. <groupId>org.springframework.boot</groupId>
  72. <artifactId>spring-boot-maven-plugin</artifactId>
  73. </plugin>
  74. </plugins>
  75. </build>
  76. <!--配置aliyun 前提是Maven 不卡-->
  77. <!-- <repositories>
  78. <repository>
  79. <id>alimaven</id>
  80. <name>aliyun maven</name>
  81. <url>http://maven.aliyun.com/nexus/content/groups/public/</url>
  82. </repository>
  83. </repositories>-->
  84. </project>

 

声明:本文内容由网友自发贡献,转载请注明出处:【wpsshop】
推荐阅读
相关标签
  

闽ICP备14008679号