pom.xml 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  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. <parent>
  6. <groupId>org.springframework.boot</groupId>
  7. <artifactId>spring-boot-starter-parent</artifactId>
  8. <version>3.4.5</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>ai.huisuan</groupId>
  12. <artifactId>back</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>back</name>
  15. <description>back</description>
  16. <url/>
  17. <licenses>
  18. <license/>
  19. </licenses>
  20. <developers>
  21. <developer/>
  22. </developers>
  23. <scm>
  24. <connection/>
  25. <developerConnection/>
  26. <tag/>
  27. <url/>
  28. </scm>
  29. <properties>
  30. <java.version>17</java.version>
  31. <spring-ai.version>1.0.0-M6</spring-ai.version>
  32. </properties>
  33. <dependencies>
  34. <!-- Spring Boot 数据访问层支持,包含JPA、Hibernate等持久层技术 -->
  35. <dependency>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-starter-data-jpa</artifactId>
  38. </dependency>
  39. <!-- JSON处理核心库,提供对象与JSON之间的序列化/反序列化功能 -->
  40. <dependency>
  41. <groupId>com.fasterxml.jackson.core</groupId>
  42. <artifactId>jackson-databind</artifactId>
  43. </dependency>
  44. <!-- OkHttp HTTP客户端,用于与Ollama API进行网络通信 -->
  45. <dependency>
  46. <groupId>com.squareup.okhttp3</groupId>
  47. <artifactId>okhttp</artifactId>
  48. <version>4.12.0</version> <!-- 推荐稳定版本,支持HTTP/2和连接池 -->
  49. </dependency>
  50. <!-- Spring AI Ollama集成模块,提供大语言模型交互能力 -->
  51. <dependency>
  52. <groupId>org.springframework.ai</groupId>
  53. <artifactId>spring-ai-ollama-spring-boot-starter</artifactId>
  54. </dependency>
  55. <!-- Bean验证规范API,用于数据校验(如@NotNull等注解) -->
  56. <dependency>
  57. <groupId>javax.validation</groupId>
  58. <artifactId>validation-api</artifactId>
  59. <version>2.0.1.Final</version>
  60. </dependency>
  61. <!-- Hibernate Validator实现,提供具体的校验功能 -->
  62. <dependency>
  63. <groupId>org.hibernate.validator</groupId>
  64. <artifactId>hibernate-validator</artifactId>
  65. <version>6.2.0.Final</version>
  66. </dependency>
  67. <!-- Spring Boot Web开发核心,包含Servlet API、MVC等Web组件 -->
  68. <dependency>
  69. <groupId>org.springframework.boot</groupId>
  70. <artifactId>spring-boot-starter-web</artifactId>
  71. <version>2.7.18</version> <!-- 保持与Spring Boot父POM版本一致 -->
  72. </dependency>
  73. <!-- MyBatis持久层框架Spring Boot Starter -->
  74. <dependency>
  75. <groupId>org.mybatis.spring.boot</groupId>
  76. <artifactId>mybatis-spring-boot-starter</artifactId>
  77. <version>3.0.4</version>
  78. </dependency>
  79. <!-- Spring AI核心模块,提供AI功能的基础支持 -->
  80. <dependency>
  81. <groupId>org.springframework.ai</groupId>
  82. <artifactId>spring-ai-core</artifactId>
  83. </dependency>
  84. <!-- MySQL数据库驱动(JDBC连接) -->
  85. <dependency>
  86. <groupId>com.mysql</groupId>
  87. <artifactId>mysql-connector-j</artifactId>
  88. <scope>runtime</scope> <!-- 运行时依赖 -->
  89. </dependency>
  90. <!-- Lombok注解处理器,简化JavaBean代码 -->
  91. <dependency>
  92. <groupId>org.projectlombok</groupId>
  93. <artifactId>lombok</artifactId>
  94. <optional>true</optional> <!-- 编译时需要,运行时不需要 -->
  95. </dependency>
  96. <!-- Spring Boot测试支持 -->
  97. <dependency>
  98. <groupId>org.springframework.boot</groupId>
  99. <artifactId>spring-boot-starter-test</artifactId>
  100. <scope>test</scope> <!-- 仅测试时使用 -->
  101. </dependency>
  102. <!-- MyBatis单元测试支持 -->
  103. <dependency>
  104. <groupId>org.mybatis.spring.boot</groupId>
  105. <artifactId>mybatis-spring-boot-starter-test</artifactId>
  106. <version>3.0.4</version>
  107. <scope>test</scope>
  108. </dependency>
  109. <!-- JWT API规范 -->
  110. <dependency>
  111. <groupId>io.jsonwebtoken</groupId>
  112. <artifactId>jjwt-api</artifactId>
  113. <version>0.11.5</version>
  114. </dependency>
  115. <!-- JWT实现库(运行时依赖) -->
  116. <dependency>
  117. <groupId>io.jsonwebtoken</groupId>
  118. <artifactId>jjwt-impl</artifactId>
  119. <version>0.11.5</version>
  120. <scope>runtime</scope>
  121. </dependency>
  122. <!-- JWT JSON序列化支持 -->
  123. <dependency>
  124. <groupId>io.jsonwebtoken</groupId>
  125. <artifactId>jjwt-jackson</artifactId>
  126. <version>0.11.5</version>
  127. <scope>runtime</scope>
  128. </dependency>
  129. <!-- Spring Security 依赖 -->
  130. <dependency>
  131. <groupId>org.springframework.boot</groupId>
  132. <artifactId>spring-boot-starter-security</artifactId>
  133. </dependency>
  134. </dependencies>
  135. <dependencyManagement>
  136. <dependencies>
  137. <dependency>
  138. <groupId>org.springframework.ai</groupId>
  139. <artifactId>spring-ai-bom</artifactId>
  140. <version>${spring-ai.version}</version>
  141. <type>pom</type>
  142. <scope>import</scope>
  143. </dependency>
  144. </dependencies>
  145. </dependencyManagement>
  146. <repositories>
  147. <repository>
  148. <id>central</id>
  149. <url>https://repo.maven.apache.org/maven2</url>
  150. </repository>
  151. <repository>
  152. <id>spring-milestones</id>
  153. <name>Spring Milestones</name>
  154. <url>https://maven.aliyun.com/repository/public/</url>
  155. </repository>
  156. <repository>
  157. <id>jcenter</id>
  158. <name>JCenter</name>
  159. <url>https://jcenter.bintray.com/</url>
  160. </repository>
  161. </repositories>
  162. <build>
  163. <plugins>
  164. <plugin>
  165. <groupId>org.apache.maven.plugins</groupId>
  166. <artifactId>maven-compiler-plugin</artifactId>
  167. <configuration>
  168. <annotationProcessorPaths>
  169. <path>
  170. <groupId>org.projectlombok</groupId>
  171. <artifactId>lombok</artifactId>
  172. </path>
  173. </annotationProcessorPaths>
  174. </configuration>
  175. </plugin>
  176. <plugin>
  177. <groupId>org.springframework.boot</groupId>
  178. <artifactId>spring-boot-maven-plugin</artifactId>
  179. <configuration>
  180. <excludes>
  181. <exclude>
  182. <groupId>org.projectlombok</groupId>
  183. <artifactId>lombok</artifactId>
  184. </exclude>
  185. </excludes>
  186. </configuration>
  187. </plugin>
  188. </plugins>
  189. </build>
  190. </project>