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

171 lines
5.8KB

  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>org.springframework.boot</groupId>
  32. <artifactId>spring-boot-starter-actuator</artifactId>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.springframework.cloud</groupId>
  36. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  37. <version>2.2.1.RELEASE</version>
  38. </dependency>
  39. <!-- 核心依赖,新版resource-->
  40. <dependency>
  41. <groupId>org.springframework.boot</groupId>
  42. <artifactId>spring-boot-starter-oauth2-resource-server</artifactId>
  43. </dependency>
  44. <dependency>
  45. <groupId>org.springframework.boot</groupId>
  46. <artifactId>spring-boot-starter-test</artifactId>
  47. <scope>test</scope>
  48. </dependency>
  49. <!-- Spring Security Oauth2 依赖 -->
  50. <dependency>
  51. <groupId>org.springframework.cloud</groupId>
  52. <artifactId>spring-cloud-starter-oauth2</artifactId>
  53. <!-- 此处需要加版本号 -->
  54. <version>2.2.5.RELEASE</version>
  55. </dependency>
  56. <dependency>
  57. <groupId>org.springframework.cloud</groupId>
  58. <artifactId>spring-cloud-starter-security</artifactId>
  59. <!-- 此处需要加版本号 -->
  60. <version>2.1.4.RELEASE</version>
  61. </dependency>
  62. <dependency>
  63. <groupId>org.springframework.security</groupId>
  64. <artifactId>spring-security-test</artifactId>
  65. <scope>test</scope>
  66. </dependency>
  67. </dependencies>
  68. <!-- 构建环境变量 -->
  69. <profiles>
  70. <!-- 本地开发环境 -->
  71. <profile>
  72. <id>local</id>
  73. <properties>
  74. <package.environment>local</package.environment>
  75. </properties>
  76. <activation>
  77. <activeByDefault>true</activeByDefault>
  78. </activation>
  79. </profile>
  80. <!-- 开发环境 -->
  81. <profile>
  82. <id>dev</id>
  83. <properties>
  84. <package.environment>dev</package.environment>
  85. </properties>
  86. </profile>
  87. <!-- 测试环境 -->
  88. <profile>
  89. <id>test</id>
  90. <properties>
  91. <package.environment>test</package.environment>
  92. </properties>
  93. </profile>
  94. <!-- 生产环境 -->
  95. <profile>
  96. <id>prod</id>
  97. <properties>
  98. <package.environment>prod</package.environment>
  99. </properties>
  100. </profile>
  101. </profiles>
  102. <!-- 构建环境配置 -->
  103. <build>
  104. <finalName>tuoheng_gateway</finalName>
  105. <resources>
  106. <resource>
  107. <directory>src/main/resources</directory>
  108. <filtering>true</filtering>
  109. </resource>
  110. <resource>
  111. <directory>src/main/java</directory>
  112. <includes>
  113. <include>**/*.*</include>
  114. </includes>
  115. <excludes>
  116. <exclude>**/*.java</exclude>
  117. </excludes>
  118. </resource>
  119. <resource>
  120. <directory>src/main/resources</directory>
  121. <filtering>true</filtering>
  122. <targetPath>WEB-INF/classes</targetPath>
  123. <includes>
  124. <include>application-${package.environment}.yml</include>
  125. </includes>
  126. </resource>
  127. </resources>
  128. <pluginManagement>
  129. <plugins>
  130. <plugin>
  131. <groupId>org.springframework.boot</groupId>
  132. <artifactId>spring-boot-maven-plugin</artifactId>
  133. <version>2.1.11.RELEASE</version>
  134. <configuration>
  135. <finalName>${project.build.finalName}</finalName>
  136. </configuration>
  137. <executions>
  138. <execution>
  139. <goals>
  140. <goal>repackage</goal>
  141. </goals>
  142. </execution>
  143. </executions>
  144. </plugin>
  145. </plugins>
  146. </pluginManagement>
  147. <plugins>
  148. <plugin>
  149. <groupId>org.springframework.boot</groupId>
  150. <artifactId>spring-boot-maven-plugin</artifactId>
  151. <executions>
  152. <execution>
  153. <goals>
  154. <goal>repackage</goal>
  155. </goals>
  156. </execution>
  157. </executions>
  158. </plugin>
  159. </plugins>
  160. </build>
  161. </project>