pom.xml 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112
  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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <modelVersion>4.0.0</modelVersion>
  5. <!-- maven的父依赖 -->
  6. <parent>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-parent</artifactId>
  9. <version>3.2.0</version>
  10. <!-- 3.2.0 对应 spring 6.1.1 -->
  11. <!-- 3.2.1 对应 spring 6.1.2 -->
  12. <!-- 3.2.2 对应 spring 6.1.3 -->
  13. <relativePath/> <!-- lookup parent from repository -->
  14. </parent>
  15. <groupId>com.sf</groupId>
  16. <artifactId>springboot-demo</artifactId>
  17. <version>0.0.1-SNAPSHOT</version>
  18. <name>springboot-demo</name>
  19. <description>springboot-demo</description>
  20. <properties>
  21. <java.version>17</java.version>
  22. </properties>
  23. <!-- <dependencyManagement>
  24. <dependencies>
  25. <dependency>
  26. 父pom中 提供了依赖管理器 子依赖只有在引入依赖时 才会真正加载jar包
  27. 父pom只管理版本 不管理是否被使用
  28. -->
  29. <dependencies>
  30. <!-- springboot 启动web项目的依赖 -->
  31. <dependency>
  32. <groupId>org.springframework.boot</groupId>
  33. <artifactId>spring-boot-starter-web</artifactId>
  34. </dependency>
  35. <!-- spring-test的升级版 spring-boot-starter-test -->
  36. <dependency>
  37. <groupId>org.springframework.boot</groupId>
  38. <artifactId>spring-boot-starter-test</artifactId>
  39. <scope>test</scope>
  40. </dependency>
  41. <dependency>
  42. <groupId>org.springframework.boot</groupId>
  43. <artifactId>spring-boot-starter-thymeleaf</artifactId>
  44. <!-- 如果是springboot整合别的框架 名字叫做 spring-boot-starter-* -->
  45. <!-- 如果是别的框架整合springboot 名字叫做 *-spring-boot-starter -->
  46. </dependency>
  47. <dependency>
  48. <groupId>org.mybatis.spring.boot</groupId>
  49. <artifactId>mybatis-spring-boot-starter</artifactId>
  50. <!-- 在引入依赖时 如果父依赖的父依赖没有管理版本号 则需要自己引入 -->
  51. <!-- 当别的框架整合springboot时 往往需要自己管理版本 -->
  52. <version>3.0.3</version>
  53. </dependency>
  54. <!-- 数据库驱动 这个依赖有版本号 对应8.1.0-->
  55. <dependency>
  56. <groupId>com.mysql</groupId>
  57. <artifactId>mysql-connector-j</artifactId>
  58. <!-- 区别于原来使用的 mysql-connector-java -->
  59. <!-- <version>8.2.0</version>-->
  60. </dependency>
  61. <dependency>
  62. <groupId>org.projectlombok</groupId>
  63. <artifactId>lombok</artifactId>
  64. <version>1.18.30</version>
  65. </dependency>
  66. <!-- 使用thymeleaf生成代码 -->
  67. <dependency>
  68. <groupId>ognl</groupId>
  69. <artifactId>ognl</artifactId>
  70. <version>3.4.2</version>
  71. </dependency>
  72. <!-- 整合mybatis plus -->
  73. <dependency>
  74. <groupId>com.baomidou</groupId>
  75. <artifactId>mybatis-plus-boot-starter</artifactId>
  76. <version>3.5.4</version>
  77. </dependency>
  78. <!-- 使用mybatis plus的代码生成工具 使用了模板引擎freemarker -->
  79. <dependency>
  80. <groupId>com.baomidou</groupId>
  81. <artifactId>mybatis-plus-generator</artifactId>
  82. <version>3.5.4</version>
  83. </dependency>
  84. <dependency>
  85. <groupId>org.freemarker</groupId>
  86. <artifactId>freemarker</artifactId>
  87. <version>2.3.32</version>
  88. </dependency>
  89. </dependencies>
  90. <build>
  91. <plugins>
  92. <plugin>
  93. <groupId>org.springframework.boot</groupId>
  94. <artifactId>spring-boot-maven-plugin</artifactId>
  95. </plugin>
  96. </plugins>
  97. </build>
  98. </project>