拓恒统一网关服务
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.

190 lines
6.3KB

  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. </dependencies>
  83. <!-- 构建环境变量 -->
  84. <profiles>
  85. <!-- 本地开发环境 -->
  86. <profile>
  87. <id>local</id>
  88. <properties>
  89. <package.environment>local</package.environment>
  90. </properties>
  91. <activation>
  92. <activeByDefault>true</activeByDefault>
  93. </activation>
  94. </profile>
  95. <!-- 开发环境 -->
  96. <profile>
  97. <id>dev</id>
  98. <properties>
  99. <package.environment>dev</package.environment>
  100. </properties>
  101. </profile>
  102. <!-- 测试环境 -->
  103. <profile>
  104. <id>test</id>
  105. <properties>
  106. <package.environment>test</package.environment>
  107. </properties>
  108. </profile>
  109. <!-- 生产环境 -->
  110. <profile>
  111. <id>prod</id>
  112. <properties>
  113. <package.environment>prod</package.environment>
  114. </properties>
  115. </profile>
  116. </profiles>
  117. <!-- 构建环境配置 -->
  118. <build>
  119. <finalName>tuoheng_gateway</finalName>
  120. <resources>
  121. <resource>
  122. <directory>src/main/resources</directory>
  123. <filtering>true</filtering>
  124. </resource>
  125. <resource>
  126. <directory>src/main/java</directory>
  127. <includes>
  128. <include>**/*.*</include>
  129. </includes>
  130. <excludes>
  131. <exclude>**/*.java</exclude>
  132. </excludes>
  133. </resource>
  134. <resource>
  135. <directory>src/main/resources</directory>
  136. <filtering>true</filtering>
  137. <targetPath>WEB-INF/classes</targetPath>
  138. <includes>
  139. <include>application-${package.environment}.yml</include>
  140. </includes>
  141. </resource>
  142. </resources>
  143. <pluginManagement>
  144. <plugins>
  145. <plugin>
  146. <groupId>org.springframework.boot</groupId>
  147. <artifactId>spring-boot-maven-plugin</artifactId>
  148. <version>2.1.11.RELEASE</version>
  149. <configuration>
  150. <finalName>${project.build.finalName}</finalName>
  151. </configuration>
  152. <executions>
  153. <execution>
  154. <goals>
  155. <goal>repackage</goal>
  156. </goals>
  157. </execution>
  158. </executions>
  159. </plugin>
  160. </plugins>
  161. </pluginManagement>
  162. <plugins>
  163. <plugin>
  164. <groupId>org.springframework.boot</groupId>
  165. <artifactId>spring-boot-maven-plugin</artifactId>
  166. <executions>
  167. <execution>
  168. <goals>
  169. <goal>repackage</goal>
  170. </goals>
  171. </execution>
  172. </executions>
  173. </plugin>
  174. </plugins>
  175. </build>
  176. </project>