pom.xml 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188
  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. <parent>
  7. <groupId>org.springframework.boot</groupId>
  8. <artifactId>spring-boot-starter-parent</artifactId>
  9. <version>2.7.18</version> <!-- 或 3.x,但配置略有不同 -->
  10. <relativePath/>
  11. </parent>
  12. <groupId>org.pay</groupId>
  13. <artifactId>paysupply</artifactId>
  14. <version>1.0</version>
  15. <properties>
  16. <maven.compiler.source>8</maven.compiler.source>
  17. <maven.compiler.target>8</maven.compiler.target>
  18. <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
  19. <!-- 环境标识 -->
  20. <env>dev</env>
  21. <commons-lang3.version>3.4</commons-lang3.version>
  22. <fastjson.version>2.0.61</fastjson.version>
  23. <httpcomponents-httpclient.version>4.5.14</httpcomponents-httpclient.version>
  24. <mybatis.version>3.2.0</mybatis.version>
  25. <mysql.version>8.0.33</mysql.version>
  26. </properties>
  27. <dependencies>
  28. <!-- Spring Boot Starter -->
  29. <dependency>
  30. <groupId>org.springframework.boot</groupId>
  31. <artifactId>spring-boot-starter-web</artifactId>
  32. </dependency>
  33. <!-- commons -->
  34. <dependency>
  35. <groupId>org.apache.commons</groupId>
  36. <artifactId>commons-lang3</artifactId>
  37. <version>${commons-lang3.version}</version>
  38. </dependency>
  39. <!-- Apache HTTP Client -->
  40. <dependency>
  41. <groupId>org.apache.httpcomponents</groupId>
  42. <artifactId>httpclient</artifactId>
  43. <version>${httpcomponents-httpclient.version}</version>
  44. </dependency>
  45. <!-- lombok -->
  46. <dependency>
  47. <groupId>org.projectlombok</groupId>
  48. <artifactId>lombok</artifactId>
  49. <optional>true</optional>
  50. </dependency>
  51. <!-- json依赖 -->
  52. <dependency>
  53. <groupId>com.alibaba</groupId>
  54. <artifactId>fastjson</artifactId>
  55. <version>${fastjson.version}</version>
  56. </dependency>
  57. <dependency>
  58. <groupId>org.springframework.boot</groupId>
  59. <artifactId>spring-boot-starter-validation</artifactId>
  60. </dependency>
  61. <!-- mongodb -->
  62. <dependency>
  63. <groupId>org.springframework.boot</groupId>
  64. <artifactId>spring-boot-starter-data-mongodb</artifactId>
  65. </dependency>
  66. <!--redis-->
  67. <dependency>
  68. <groupId>org.springframework.boot</groupId>
  69. <artifactId>spring-boot-starter-data-redis</artifactId>
  70. <exclusions>
  71. <!-- 过滤lettuce,使用jedis作为redis客户端 -->
  72. <exclusion>
  73. <groupId>io.lettuce</groupId>
  74. <artifactId>lettuce-core</artifactId>
  75. </exclusion>
  76. </exclusions>
  77. </dependency>
  78. <dependency>
  79. <groupId>redis.clients</groupId>
  80. <artifactId>jedis</artifactId>
  81. </dependency>
  82. <!-- @RefreshScope 核心支持 -->
  83. <dependency>
  84. <groupId>org.springframework.cloud</groupId>
  85. <artifactId>spring-cloud-starter-bootstrap</artifactId>
  86. </dependency>
  87. <!-- spring cloud config -->
  88. <dependency>
  89. <groupId>org.springframework.cloud</groupId>
  90. <artifactId>spring-cloud-starter-config</artifactId>
  91. </dependency>
  92. </dependencies>
  93. <!-- BOM 版本管理 -->
  94. <dependencyManagement>
  95. <dependencies>
  96. <dependency>
  97. <groupId>org.springframework.cloud</groupId>
  98. <artifactId>spring-cloud-dependencies</artifactId>
  99. <version>2021.0.9</version>
  100. <type>pom</type>
  101. <scope>import</scope>
  102. </dependency>
  103. </dependencies>
  104. </dependencyManagement>
  105. <!-- 环境配置 -->
  106. <profiles>
  107. <!-- 生产环境 -->
  108. <profile>
  109. <id>pro</id>
  110. <activation>
  111. <activeByDefault>true</activeByDefault>
  112. </activation>
  113. <properties>
  114. <env>pro</env>
  115. <spring.profiles.active>pro</spring.profiles.active>
  116. </properties>
  117. <build>
  118. <finalName>${project.artifactId}-${project.version}-pro</finalName>
  119. </build>
  120. </profile>
  121. </profiles>
  122. <build>
  123. <!-- 资源过滤配置 -->
  124. <resources>
  125. <resource>
  126. <directory>src/main/resources</directory>
  127. <filtering>true</filtering>
  128. <includes>
  129. <include>**/*.properties</include>
  130. <include>**/*.yml</include>
  131. <include>**/*.yaml</include>
  132. <include>**/*.xml</include>
  133. </includes>
  134. </resource>
  135. <resource>
  136. <directory>src/main/resources</directory>
  137. <filtering>false</filtering>
  138. <excludes>
  139. <exclude>**/*.properties</exclude>
  140. <exclude>**/*.yml</exclude>
  141. <exclude>**/*.yaml</exclude>
  142. <exclude>**/*.xml</exclude>
  143. </excludes>
  144. </resource>
  145. </resources>
  146. <plugins>
  147. <plugin>
  148. <groupId>org.springframework.boot</groupId>
  149. <artifactId>spring-boot-maven-plugin</artifactId>
  150. <configuration>
  151. <!-- 激活的Spring Profile -->
  152. <profiles>
  153. <profile>${spring.profiles.active}</profile>
  154. </profiles>
  155. </configuration>
  156. </plugin>
  157. <!-- 资源过滤插件 -->
  158. <plugin>
  159. <groupId>org.apache.maven.plugins</groupId>
  160. <artifactId>maven-resources-plugin</artifactId>
  161. <version>3.2.0</version>
  162. <configuration>
  163. <encoding>UTF-8</encoding>
  164. </configuration>
  165. </plugin>
  166. </plugins>
  167. </build>
  168. </project>