pom.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129
  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.2.5</version>
  9. <relativePath/>
  10. </parent>
  11. <groupId>com.zhongsou</groupId>
  12. <artifactId>db-ai</artifactId>
  13. <version>0.0.1-SNAPSHOT</version>
  14. <name>db-ai</name>
  15. <description>对接火山豆包助手API的新项目</description>
  16. <properties>
  17. <java.version>17</java.version>
  18. <!-- 显式指定 Jackson 版本,修复 DoS 漏洞 -->
  19. <jackson.version>2.15.7</jackson.version>
  20. <!-- MyBatis-Plus 版本(适配 Spring Boot 3.2.x) -->
  21. <mybatis-plus.version>3.5.5</mybatis-plus.version>
  22. </properties>
  23. <dependencies>
  24. <!-- 核心:Spring Web(自带RestTemplate、Jackson) -->
  25. <dependency>
  26. <groupId>org.springframework.boot</groupId>
  27. <artifactId>spring-boot-starter-web</artifactId>
  28. </dependency>
  29. <!-- 仅需这一行,包含Redis核心+自动配置,无需额外依赖 -->
  30. <dependency>
  31. <groupId>org.springframework.boot</groupId>
  32. <artifactId>spring-boot-starter-data-redis</artifactId>
  33. </dependency>
  34. <!-- 数据库:JDBC + MySQL(按需保留) -->
  35. <dependency>
  36. <groupId>org.springframework.boot</groupId>
  37. <artifactId>spring-boot-starter-jdbc</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>com.mysql</groupId>
  41. <artifactId>mysql-connector-j</artifactId>
  42. <scope>runtime</scope>
  43. </dependency>
  44. <!-- MyBatis-Plus 核心依赖(适配 Spring Boot 3.x) -->
  45. <dependency>
  46. <groupId>com.baomidou</groupId>
  47. <artifactId>mybatis-plus-boot-starter</artifactId>
  48. <version>${mybatis-plus.version}</version>
  49. </dependency>
  50. <!-- Lombok(简化代码) -->
  51. <dependency>
  52. <groupId>org.projectlombok</groupId>
  53. <artifactId>lombok</artifactId>
  54. <optional>true</optional>
  55. </dependency>
  56. <!-- 测试依赖 -->
  57. <dependency>
  58. <groupId>org.springframework.boot</groupId>
  59. <artifactId>spring-boot-starter-test</artifactId>
  60. <scope>test</scope>
  61. </dependency>
  62. <!-- FastJson2 核心依赖 -->
  63. <dependency>
  64. <groupId>com.alibaba.fastjson2</groupId>
  65. <artifactId>fastjson2</artifactId>
  66. <version>2.0.45</version>
  67. </dependency>
  68. <!-- FastJson2 与 Spring 6 整合 -->
  69. <dependency>
  70. <groupId>com.alibaba.fastjson2</groupId>
  71. <artifactId>fastjson2-extension-spring6</artifactId>
  72. <version>2.0.45</version>
  73. </dependency>
  74. <!-- SpringDoc OpenAPI(Swagger UI),测试接口超方便 -->
  75. <dependency>
  76. <groupId>org.springdoc</groupId>
  77. <artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
  78. <version>2.3.0</version>
  79. </dependency>
  80. <dependency>
  81. <groupId>org.jetbrains</groupId>
  82. <artifactId>annotations</artifactId>
  83. <version>24.0.0</version>
  84. <scope>compile</scope>
  85. </dependency>
  86. <!-- Spring WebFlux(包含 WebClient) -->
  87. <dependency>
  88. <groupId>org.springframework.boot</groupId>
  89. <artifactId>spring-boot-starter-webflux</artifactId>
  90. <!-- 锁定稳定版本,和你的 Spring Boot 版本保持一致 -->
  91. <version>3.2.4</version>
  92. </dependency>
  93. <!-- 可选:如果需要更灵活的响应式处理 -->
  94. <dependency>
  95. <groupId>io.projectreactor</groupId>
  96. <artifactId>reactor-core</artifactId>
  97. <version>3.6.4</version>
  98. </dependency>
  99. </dependencies>
  100. <build>
  101. <plugins>
  102. <plugin>
  103. <groupId>org.springframework.boot</groupId>
  104. <artifactId>spring-boot-maven-plugin</artifactId>
  105. <configuration>
  106. <excludes>
  107. <exclude>
  108. <groupId>org.projectlombok</groupId>
  109. <artifactId>lombok</artifactId>
  110. </exclude>
  111. </excludes>
  112. </configuration>
  113. </plugin>
  114. </plugins>
  115. </build>
  116. </project>