pom.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>space.anyi</groupId>
  7. <artifactId>SSM_template</artifactId>
  8. <version>1.0-SNAPSHOT</version>
  9. <packaging>war</packaging>
  10. <description>SSM框架的模板</description>
  11. <properties>
  12. <maven.compiler.source>8</maven.compiler.source>
  13. <maven.compiler.target>8</maven.compiler.target>
  14. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  15. <!-- 定义依赖版本,便于统一管理 -->
  16. <spring.version>5.3.31</spring.version>
  17. <!-- Servlet和JSP相关API版本(对应Java EE 8) -->
  18. <javax.servlet.version>4.0.1</javax.servlet.version>
  19. <javax.servlet.jsp.version>2.3.3</javax.servlet.jsp.version>
  20. <!-- JSTL标签库版本 -->
  21. <jstl.version>1.2.2</jstl.version>
  22. <thymeleaf.version>3.0.12.RELEASE</thymeleaf.version>
  23. <mybatis.version>3.5.6</mybatis.version>
  24. <mybatis-spring.version>2.0.6</mybatis-spring.version>
  25. <mysql.version>8.0.25</mysql.version>
  26. </properties>
  27. <dependencies>
  28. <!-- Spring核心容器 -->
  29. <dependency>
  30. <groupId>org.springframework</groupId>
  31. <artifactId>spring-context</artifactId>
  32. <version>${spring.version}</version>
  33. </dependency>
  34. <!-- Spring Web MVC(如果你的项目是Web项目) -->
  35. <dependency>
  36. <groupId>org.springframework</groupId>
  37. <artifactId>spring-webmvc</artifactId>
  38. <version>${spring.version}</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.springframework</groupId>
  42. <artifactId>spring-jdbc</artifactId>
  43. <version>${spring.version}</version>
  44. </dependency>
  45. <!-- Spring 事务支持(必须!) -->
  46. <dependency>
  47. <groupId>org.springframework</groupId>
  48. <artifactId>spring-tx</artifactId>
  49. <version>${spring.version}</version>
  50. </dependency>
  51. <!-- Spring AOP 支持(事务注解依赖) -->
  52. <dependency>
  53. <groupId>org.springframework</groupId>
  54. <artifactId>spring-aop</artifactId>
  55. <version>${spring.version}</version>
  56. </dependency>
  57. <!-- AspectJ(如果使用 @Transactional 需要) -->
  58. <dependency>
  59. <groupId>org.aspectj</groupId>
  60. <artifactId>aspectjweaver</artifactId>
  61. <version>1.9.7</version>
  62. </dependency>
  63. <!-- Thymeleaf 核心库 -->
  64. <dependency>
  65. <groupId>org.thymeleaf</groupId>
  66. <artifactId>thymeleaf</artifactId>
  67. <version>${thymeleaf.version}</version>
  68. </dependency>
  69. <!-- Thymeleaf 与 Spring 5 集成包(Java 8 环境使用此版本) -->
  70. <dependency>
  71. <groupId>org.thymeleaf</groupId>
  72. <artifactId>thymeleaf-spring5</artifactId>
  73. <version>${thymeleaf.version}</version>
  74. </dependency>
  75. <!-- ========== MyBatis 依赖 ========== -->
  76. <dependency>
  77. <groupId>org.mybatis</groupId>
  78. <artifactId>mybatis</artifactId>
  79. <version>${mybatis.version}</version>
  80. </dependency>
  81. <dependency>
  82. <groupId>org.mybatis</groupId>
  83. <artifactId>mybatis-spring</artifactId>
  84. <version>${mybatis-spring.version}</version>
  85. </dependency>
  86. <!-- ========== 数据库驱动 ========== -->
  87. <dependency>
  88. <groupId>mysql</groupId>
  89. <artifactId>mysql-connector-java</artifactId>
  90. <version>${mysql.version}</version>
  91. </dependency>
  92. <!-- 连接池(推荐) -->
  93. <dependency>
  94. <groupId>com.alibaba</groupId>
  95. <artifactId>druid</artifactId>
  96. <version>1.2.8</version>
  97. </dependency>
  98. <!-- ========== Servlet API(provided) ========== -->
  99. <dependency>
  100. <groupId>javax.servlet</groupId>
  101. <artifactId>javax.servlet-api</artifactId>
  102. <version>4.0.1</version>
  103. <scope>provided</scope>
  104. </dependency>
  105. <!-- ========== 日志 ========== -->
  106. <dependency>
  107. <groupId>ch.qos.logback</groupId>
  108. <artifactId>logback-classic</artifactId>
  109. <version>1.2.11</version>
  110. </dependency>
  111. <!-- ========== 测试 ========== -->
  112. <dependency>
  113. <groupId>org.junit.jupiter</groupId>
  114. <artifactId>junit-jupiter</artifactId>
  115. <version>5.10.0</version>
  116. <scope>test</scope>
  117. </dependency>
  118. <dependency>
  119. <groupId>org.springframework</groupId>
  120. <artifactId>spring-test</artifactId>
  121. <version>${spring.version}</version>
  122. <scope>test</scope>
  123. </dependency>
  124. </dependencies>
  125. </project>