拓恒统一网关服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

202 lines
6.7KB

  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>2.7.4</version>
  9. <relativePath/> <!-- lookup parent from repository -->
  10. </parent>
  11. <groupId>com.tuoheng.gateway</groupId>
  12. <artifactId>tuoheng_gateway</artifactId>
  13. <version>1.0.0</version>
  14. <name>tuoheng_gateway</name>
  15. <description>tuoheng_gateway</description>
  16. <properties>
  17. <java.version>1.8</java.version>
  18. </properties>
  19. <dependencies>
  20. <dependency>
  21. <groupId>org.springframework.cloud</groupId>
  22. <artifactId>spring-cloud-starter-gateway</artifactId>
  23. <version>3.1.3</version>
  24. </dependency>
  25. <dependency>
  26. <groupId>org.springframework.cloud</groupId>
  27. <artifactId>spring-cloud-starter-consul-discovery</artifactId>
  28. <version>3.1.1</version>
  29. </dependency>
  30. <dependency>
  31. <groupId>com.auth0</groupId>
  32. <artifactId>java-jwt</artifactId>
  33. <version>3.10.0</version>
  34. </dependency>
  35. <dependency>
  36. <groupId>com.alibaba</groupId>
  37. <artifactId>fastjson</artifactId>
  38. <version>1.2.76</version>
  39. </dependency>
  40. <dependency>
  41. <groupId>org.springframework.boot</groupId>
  42. <artifactId>spring-boot-starter-actuator</artifactId>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.springframework.cloud</groupId>
  46. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  47. <version>2.2.1.RELEASE</version>
  48. </dependency>
  49. <!-- 核心依赖,新版resource-->
  50. <dependency>
  51. <groupId>org.springframework.boot</groupId>
  52. <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.springframework.boot</groupId>
  56. <artifactId>spring-boot-starter-test</artifactId>
  57. <scope>test</scope>
  58. </dependency>
  59. <!-- Spring Security Oauth2 依赖 -->
  60. <dependency>
  61. <groupId>org.springframework.cloud</groupId>
  62. <artifactId>spring-cloud-starter-oauth2</artifactId>
  63. <!-- 此处需要加版本号 -->
  64. <version>2.2.5.RELEASE</version>
  65. </dependency>
  66. <dependency>
  67. <groupId>org.springframework.cloud</groupId>
  68. <artifactId>spring-cloud-starter-security</artifactId>
  69. <!-- 此处需要加版本号 -->
  70. <version>2.1.4.RELEASE</version>
  71. </dependency>
  72. <dependency>
  73. <groupId>org.springframework.security</groupId>
  74. <artifactId>spring-security-test</artifactId>
  75. <scope>test</scope>
  76. </dependency>
  77. <dependency>
  78. <groupId>org.projectlombok</groupId>
  79. <artifactId>lombok</artifactId>
  80. <version>1.18.22</version>
  81. </dependency>
  82. <dependency>
  83. <groupId>org.apache.skywalking</groupId>
  84. <artifactId>apm-toolkit-logback-1.x</artifactId>
  85. <version>8.5.0</version>
  86. </dependency>
  87. <dependency>
  88. <groupId>org.apache.skywalking</groupId>
  89. <artifactId>apm-toolkit-trace</artifactId>
  90. <version>8.5.0</version>
  91. </dependency>
  92. </dependencies>
  93. <!-- 构建环境变量 -->
  94. <profiles>
  95. <!-- 本地开发环境 -->
  96. <profile>
  97. <id>local</id>
  98. <properties>
  99. <package.environment>local</package.environment>
  100. </properties>
  101. <activation>
  102. <activeByDefault>true</activeByDefault>
  103. </activation>
  104. </profile>
  105. <!-- 开发环境 -->
  106. <profile>
  107. <id>dev</id>
  108. <properties>
  109. <package.environment>dev</package.environment>
  110. </properties>
  111. </profile>
  112. <!-- 测试环境 -->
  113. <profile>
  114. <id>test</id>
  115. <properties>
  116. <package.environment>test</package.environment>
  117. </properties>
  118. </profile>
  119. <!-- 生产环境 -->
  120. <profile>
  121. <id>prod</id>
  122. <properties>
  123. <package.environment>prod</package.environment>
  124. </properties>
  125. </profile>
  126. </profiles>
  127. <!-- 构建环境配置 -->
  128. <build>
  129. <finalName>tuoheng_gateway</finalName>
  130. <resources>
  131. <resource>
  132. <directory>src/main/resources</directory>
  133. <filtering>true</filtering>
  134. </resource>
  135. <resource>
  136. <directory>src/main/java</directory>
  137. <includes>
  138. <include>**/*.*</include>
  139. </includes>
  140. <excludes>
  141. <exclude>**/*.java</exclude>
  142. </excludes>
  143. </resource>
  144. <resource>
  145. <directory>src/main/resources</directory>
  146. <filtering>true</filtering>
  147. <targetPath>WEB-INF/classes</targetPath>
  148. <includes>
  149. <include>application-${package.environment}.yml</include>
  150. </includes>
  151. </resource>
  152. </resources>
  153. <pluginManagement>
  154. <plugins>
  155. <plugin>
  156. <groupId>org.springframework.boot</groupId>
  157. <artifactId>spring-boot-maven-plugin</artifactId>
  158. <version>2.1.11.RELEASE</version>
  159. <configuration>
  160. <finalName>${project.build.finalName}</finalName>
  161. </configuration>
  162. <executions>
  163. <execution>
  164. <goals>
  165. <goal>repackage</goal>
  166. </goals>
  167. </execution>
  168. </executions>
  169. </plugin>
  170. </plugins>
  171. </pluginManagement>
  172. <plugins>
  173. <plugin>
  174. <groupId>org.springframework.boot</groupId>
  175. <artifactId>spring-boot-maven-plugin</artifactId>
  176. <executions>
  177. <execution>
  178. <goals>
  179. <goal>repackage</goal>
  180. </goals>
  181. </execution>
  182. </executions>
  183. </plugin>
  184. </plugins>
  185. </build>
  186. </project>