pom.xml 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xmlns="http://maven.apache.org/POM/4.0.0"
  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>com.dk.iboss</groupId>
  7. <artifactId>dkic-server-gateway</artifactId>
  8. <version>3.0.0</version>
  9. <name>dkic-server-gateway</name>
  10. <description>dk iboss gateway server</description>
  11. <parent>
  12. <groupId>org.springframework.boot</groupId>
  13. <artifactId>spring-boot-starter-parent</artifactId>
  14. <version>2.2.6.RELEASE</version>
  15. <relativePath/>
  16. </parent>
  17. <properties>
  18. <maven.compiler.source>8</maven.compiler.source>
  19. <maven.compiler.target>8</maven.compiler.target>
  20. <springframework-cloud.version>Hoxton.RELEASE</springframework-cloud.version>
  21. <alibaba-cloud.version>2.2.0.RELEASE</alibaba-cloud.version>
  22. </properties>
  23. <profiles>
  24. <profile>
  25. <id>st</id>
  26. <properties>
  27. <environment>st</environment>
  28. </properties>
  29. </profile>
  30. <profile>
  31. <id>uat</id>
  32. <properties>
  33. <environment>uat</environment>
  34. </properties>
  35. </profile>
  36. <profile>
  37. <id>prod</id>
  38. <properties>
  39. <environment>prod</environment>
  40. </properties>
  41. </profile>
  42. <profile>
  43. <id>test</id>
  44. <properties>
  45. <environment>test</environment>
  46. </properties>
  47. </profile>
  48. <profile>
  49. <id>dev</id>
  50. <properties>
  51. <environment>dev</environment>
  52. </properties>
  53. <activation>
  54. <activeByDefault>true</activeByDefault><!-- 默认激活该profile节点-->
  55. </activation>
  56. </profile>
  57. </profiles>
  58. <dependencyManagement>
  59. <dependencies>
  60. <!--整合spring cloud-->
  61. <dependency>
  62. <groupId>org.springframework.cloud</groupId>
  63. <artifactId>spring-cloud-dependencies</artifactId>
  64. <version>${springframework-cloud.version}</version>
  65. <type>pom</type>
  66. <scope>import</scope>
  67. </dependency>
  68. <!--整合spring cloud alibaba-->
  69. <dependency>
  70. <groupId>com.alibaba.cloud</groupId>
  71. <artifactId>spring-cloud-alibaba-dependencies</artifactId>
  72. <version>${alibaba-cloud.version}</version>
  73. <type>pom</type>
  74. <scope>import</scope>
  75. </dependency>
  76. </dependencies>
  77. </dependencyManagement>
  78. <dependencies>
  79. <dependency>
  80. <groupId>com.alibaba.cloud</groupId>
  81. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  82. </dependency>
  83. <!--项目整合Nacos实现配置管理-->
  84. <dependency>
  85. <groupId>com.alibaba.cloud</groupId>
  86. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  87. </dependency>
  88. <!--必须加,不加不注册-->
  89. <dependency>
  90. <groupId>org.springframework.boot</groupId>
  91. <artifactId>spring-boot-starter-actuator</artifactId>
  92. </dependency>
  93. <!--lombok-->
  94. <dependency>
  95. <groupId>org.projectlombok</groupId>
  96. <artifactId>lombok</artifactId>
  97. <optional>true</optional>
  98. </dependency>
  99. <!--sentinel-->
  100. <dependency>
  101. <groupId>com.alibaba.cloud</groupId>
  102. <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
  103. </dependency>
  104. <!--redis-->
  105. <dependency>
  106. <groupId>org.springframework.boot</groupId>
  107. <artifactId>spring-boot-starter-data-redis</artifactId>
  108. <version>2.3.1.RELEASE</version>
  109. </dependency>
  110. <!--webflux与webmvc不兼容,需要排除掉,否则会项目启动不起来-->
  111. <dependency>
  112. <groupId>org.springframework.boot</groupId>
  113. <artifactId>spring-boot-starter-web</artifactId>
  114. <exclusions>
  115. <exclusion>
  116. <groupId>org.springframework</groupId>
  117. <artifactId>spring-webmvc</artifactId>
  118. </exclusion>
  119. <exclusion>
  120. <groupId>org.apache.tomcat.embed</groupId>
  121. <artifactId>tomcat-embed-core</artifactId>
  122. </exclusion>
  123. </exclusions>
  124. </dependency>
  125. <!--webflux-->
  126. <dependency>
  127. <groupId>org.springframework.boot</groupId>
  128. <artifactId>spring-boot-starter-webflux</artifactId>
  129. </dependency>
  130. <!--服务发现-->
  131. <dependency>
  132. <groupId>com.alibaba.cloud</groupId>
  133. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  134. </dependency>
  135. <!--gateway网关-->
  136. <dependency>
  137. <groupId>org.springframework.cloud</groupId>
  138. <artifactId>spring-cloud-starter-gateway</artifactId>
  139. </dependency>
  140. <!--feign-->
  141. <dependency>
  142. <groupId>org.springframework.cloud</groupId>
  143. <artifactId>spring-cloud-starter-openfeign</artifactId>
  144. </dependency>
  145. <!--loadbalancer-->
  146. <dependency>
  147. <groupId>org.springframework.cloud</groupId>
  148. <artifactId>spring-cloud-starter-loadbalancer</artifactId>
  149. </dependency>
  150. <!-- JWT -->
  151. <dependency>
  152. <groupId>com.auth0</groupId>
  153. <artifactId>java-jwt</artifactId>
  154. <version>3.4.1</version>
  155. </dependency>
  156. </dependencies>
  157. <build>
  158. <resources>
  159. <resource> <!--此处配置到java是因为mapper.xml文件在java目录-->
  160. <directory>src/main/java</directory>
  161. <includes>
  162. <include>**/*.xml</include>
  163. </includes>
  164. <filtering>false</filtering>
  165. </resource>
  166. <resource> <!--项目配置文件-->
  167. <directory>src/main/resources/${environment}</directory>
  168. <includes>
  169. <include>**/*</include>
  170. </includes>
  171. </resource>
  172. <resource> <!--日志配置文件-->
  173. <directory>src/main/resources</directory>
  174. <includes>
  175. <include>**/*</include>
  176. </includes>
  177. </resource>
  178. </resources>
  179. <plugins>
  180. <plugin>
  181. <groupId>org.springframework.boot</groupId>
  182. <artifactId>spring-boot-maven-plugin</artifactId>
  183. <configuration>
  184. <mainClass>com.dk.gateway.GatewayServer</mainClass>
  185. </configuration>
  186. <executions>
  187. <execution>
  188. <goals>
  189. <goal>repackage</goal>
  190. </goals>
  191. </execution>
  192. </executions>
  193. </plugin>
  194. <plugin>
  195. <groupId>com.spotify</groupId>
  196. <artifactId>docker-maven-plugin</artifactId>
  197. <version>1.2.2</version>
  198. <configuration>
  199. <serverId>aliyun-acr</serverId>
  200. <registryUrl>registry.cn-shenzhen.aliyuncs.com</registryUrl>
  201. <!--依赖的基础镜像-->
  202. <baseImage>java</baseImage>
  203. <!--imageName必须跟仓库路径一致-->
  204. <imageName>registry.cn-shenzhen.aliyuncs.com/hgscrm-${environment}/${project.artifactId}:${project.version}</imageName>
  205. <!-- 指定Dockerfile所在的路径 -->
  206. <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
  207. <resources>
  208. <resource>
  209. <targetPath>/</targetPath>
  210. <directory>${project.build.directory}</directory>
  211. <include>${project.build.finalName}.jar</include>
  212. </resource>
  213. </resources>
  214. <pushImage>true</pushImage>
  215. </configuration>
  216. </plugin>
  217. </plugins>
  218. </build>
  219. <repositories>
  220. <repository>
  221. <!--恒洁maven私服 haip仓库-->
  222. <id>private</id>
  223. <name>private</name>
  224. <url>http://172.17.216.67:8081/repository/haip</url>
  225. <releases>
  226. <enabled>true</enabled>
  227. </releases>
  228. <snapshots>
  229. <enabled>true</enabled>
  230. </snapshots>
  231. </repository>
  232. <!--maven私服 setting.xml 配置
  233. <server>
  234. <id>haip</id>
  235. <username>haip</username>
  236. <password>haip2020</password>
  237. </server>-->
  238. <!--阿里云仓库-->
  239. <repository>
  240. <id>aliyun</id>
  241. <name>aliyun</name>
  242. <url>https://maven.aliyun.com/repository/public</url>
  243. <releases>
  244. <enabled>true</enabled>
  245. </releases>
  246. <snapshots>
  247. <enabled>true</enabled>
  248. </snapshots>
  249. </repository>
  250. <!--中央仓库-->
  251. <repository>
  252. <id>central</id>
  253. <name>central</name>
  254. <url>https://repo1.maven.org/maven2</url>
  255. <releases>
  256. <enabled>true</enabled>
  257. </releases>
  258. <snapshots>
  259. <enabled>true</enabled>
  260. </snapshots>
  261. </repository>
  262. </repositories>
  263. </project>