pom.xml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204
  1. <project xmlns="http://maven.apache.org/POM/4.0.0"
  2. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  4. <parent>
  5. <groupId>com.zd</groupId>
  6. <artifactId>zd</artifactId>
  7. <version>3.1.0</version>
  8. </parent>
  9. <modelVersion>4.0.0</modelVersion>
  10. <artifactId>zd-gateway</artifactId>
  11. <description>
  12. zd-gateway网关模块
  13. </description>
  14. <dependencies>
  15. <!-- SpringCloud Gateway -->
  16. <dependency>
  17. <groupId>org.springframework.cloud</groupId>
  18. <artifactId>spring-cloud-starter-gateway</artifactId>
  19. </dependency>
  20. <!-- SpringCloud Alibaba Nacos -->
  21. <dependency>
  22. <groupId>com.alibaba.cloud</groupId>
  23. <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
  24. </dependency>
  25. <!-- SpringCloud Alibaba Nacos Config -->
  26. <dependency>
  27. <groupId>com.alibaba.cloud</groupId>
  28. <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
  29. </dependency>
  30. <!-- SpringCloud Alibaba Sentinel -->
  31. <dependency>
  32. <groupId>com.alibaba.cloud</groupId>
  33. <artifactId>spring-cloud-starter-alibaba-sentinel</artifactId>
  34. </dependency>
  35. <!-- SpringCloud Alibaba Sentinel Gateway -->
  36. <dependency>
  37. <groupId>com.alibaba.cloud</groupId>
  38. <artifactId>spring-cloud-alibaba-sentinel-gateway</artifactId>
  39. </dependency>
  40. <!-- Sentinel Datasource Nacos -->
  41. <dependency>
  42. <groupId>com.alibaba.csp</groupId>
  43. <artifactId>sentinel-datasource-nacos</artifactId>
  44. </dependency>
  45. <!-- SpringBoot Actuator -->
  46. <dependency>
  47. <groupId>org.springframework.boot</groupId>
  48. <artifactId>spring-boot-starter-actuator</artifactId>
  49. </dependency>
  50. <!--验证码 -->
  51. <dependency>
  52. <groupId>com.github.penggle</groupId>
  53. <artifactId>kaptcha</artifactId>
  54. </dependency>
  55. <!-- zd Common Redis-->
  56. <dependency>
  57. <groupId>com.zd</groupId>
  58. <artifactId>zd-common-redis</artifactId>
  59. </dependency>
  60. <!-- Swagger -->
  61. <dependency>
  62. <groupId>io.springfox</groupId>
  63. <artifactId>springfox-swagger-ui</artifactId>
  64. <version>${swagger.fox.version}</version>
  65. </dependency>
  66. <dependency>
  67. <groupId>com.github.xiaoymin</groupId>
  68. <artifactId>knife4j-spring-ui</artifactId>
  69. </dependency>
  70. <dependency>
  71. <groupId>io.springfox</groupId>
  72. <artifactId>springfox-swagger2</artifactId>
  73. <version>${swagger.fox.version}</version>
  74. </dependency>
  75. </dependencies>
  76. <build>
  77. <finalName>${project.artifactId}</finalName>
  78. <plugins>
  79. <plugin>
  80. <groupId>org.springframework.boot</groupId>
  81. <artifactId>spring-boot-maven-plugin</artifactId>
  82. <executions>
  83. <execution>
  84. <goals>
  85. <goal>repackage</goal>
  86. </goals>
  87. </execution>
  88. </executions>
  89. </plugin>
  90. <!-- 打包时跳过test插件,不运行test测试用例 -->
  91. <plugin>
  92. <groupId>org.apache.maven.plugins</groupId>
  93. <artifactId>maven-surefire-plugin</artifactId>
  94. <version>${maven-surefire-plugin.version}</version>
  95. <configuration>
  96. <skipTests>true</skipTests>
  97. </configuration>
  98. </plugin>
  99. <!-- docker的maven插件 -->
  100. <!-- <plugin>-->
  101. <!-- <groupId>io.fabric8</groupId>-->
  102. <!-- <artifactId>docker-maven-plugin</artifactId>-->
  103. <!-- <version>${docker.maven.verion}</version>-->
  104. <!-- <executions>-->
  105. <!-- &lt;!&ndash;执行 mvn package 时 自动构建docker镜像并推送到仓库 &ndash;&gt;-->
  106. <!-- <execution>-->
  107. <!-- <id>default</id>-->
  108. <!-- <phase>package</phase>-->
  109. <!-- <goals>-->
  110. <!-- &lt;!&ndash;删除老镜像&ndash;&gt;-->
  111. <!-- <goal>remove</goal>-->
  112. <!-- &lt;!&ndash;构建镜像&ndash;&gt;-->
  113. <!-- <goal>build</goal>-->
  114. <!-- &lt;!&ndash;推送镜像到阿里云&ndash;&gt;-->
  115. <!--&lt;!&ndash; <goal>push</goal>&ndash;&gt;-->
  116. <!-- &lt;!&ndash;运行镜像&ndash;&gt;-->
  117. <!-- <goal>run</goal>-->
  118. <!-- </goals>-->
  119. <!-- </execution>-->
  120. <!-- </executions>-->
  121. <!-- <configuration>-->
  122. <!-- &lt;!&ndash; docker主机 &ndash;&gt;-->
  123. <!-- <dockerHost>tcp://192.168.1.88:2375</dockerHost>-->
  124. <!-- <authConfig>-->
  125. <!-- &lt;!&ndash; registry服务的认证&ndash;&gt;-->
  126. <!-- <username>${docker.registry.username}</username>-->
  127. <!-- <password>${docker.registry.password}</password>-->
  128. <!-- </authConfig>-->
  129. <!-- <images>-->
  130. <!-- <image>-->
  131. <!-- &lt;!&ndash; [命名空间] / [镜像名称:版本号] &ndash;&gt;-->
  132. <!-- <name>${docker.registry}/${docker.namespace}/${project.artifactId}</name>-->
  133. <!-- &lt;!&ndash; 仓库地址 &ndash;&gt;-->
  134. <!-- <registry>${docker.registry}</registry>-->
  135. <!-- <build>-->
  136. <!-- &lt;!&ndash; dockerFile文件路径&ndash;&gt;-->
  137. <!-- <dockerFile>${project.basedir}/Dockerfile</dockerFile>-->
  138. <!-- <tags>-->
  139. <!-- &lt;!&ndash; 构建版本&ndash;&gt;-->
  140. <!-- <tag>${project.version}</tag>-->
  141. <!-- </tags>-->
  142. <!-- </build>-->
  143. <!-- <run>-->
  144. <!-- &lt;!&ndash; 环境变量配置&ndash;&gt;-->
  145. <!-- <env>-->
  146. <!-- &lt;!&ndash; 次数可参考 docker/zd/docker-compose.env 下的变量根据实际关联地址配置 &ndash;&gt;-->
  147. <!-- <NACOS_HOST>192.168.1.88</NACOS_HOST>-->
  148. <!-- <REDIS_HOST>192.168.1.43</REDIS_HOST>-->
  149. <!-- </env>-->
  150. <!-- &lt;!&ndash; 端口映射&ndash;&gt;-->
  151. <!-- <ports>-->
  152. <!-- <port>9081:8080</port>-->
  153. <!-- </ports>-->
  154. <!-- &lt;!&ndash; 挂载卷&ndash;&gt;-->
  155. <!-- <volumes>-->
  156. <!-- <bind>-->
  157. <!-- &lt;!&ndash; 可多配置&ndash;&gt;-->
  158. <!-- <volume>-->
  159. <!-- /zd/logs/${project.artifactId}:/logs/${project.artifactId}-->
  160. <!-- </volume>-->
  161. <!-- </bind>-->
  162. <!-- </volumes>-->
  163. <!-- <autoRemove>false</autoRemove>-->
  164. <!-- &lt;!&ndash; 重启策略&ndash;&gt;-->
  165. <!-- <restartPolicy>-->
  166. <!-- &lt;!&ndash; 总是&ndash;&gt;-->
  167. <!-- <name>always</name>-->
  168. <!-- &lt;!&ndash; 失败时重启&ndash;&gt;-->
  169. <!--&lt;!&ndash; <name>on-failure</name>&ndash;&gt;-->
  170. <!-- &lt;!&ndash; 重启次数,当上方name配置采用on-failure时生效&ndash;&gt;-->
  171. <!--&lt;!&ndash; <retry>3</retry>&ndash;&gt;-->
  172. <!-- </restartPolicy>-->
  173. <!-- </run>-->
  174. <!-- </image>-->
  175. <!-- </images>-->
  176. <!-- <buildArgs>-->
  177. <!-- &lt;!&ndash; dockerfile参数,指定jar路径 &ndash;&gt;-->
  178. <!-- <JAR_FILE>${project.artifactId}.jar</JAR_FILE>-->
  179. <!-- </buildArgs>-->
  180. <!-- </configuration>-->
  181. <!-- </plugin>-->
  182. </plugins>
  183. </build>
  184. </project>