pom.xml 5.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  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>com.lantone</groupId>
  7. <artifactId>emrais</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. </parent>
  10. <artifactId>gateway-service</artifactId>
  11. <name>gateway-service</name>
  12. <packaging>jar</packaging>
  13. <description>基于Spring Cloud Gateway的微服务API网关服务</description>
  14. <dependencies>
  15. <dependency>
  16. <groupId>com.lantone</groupId>
  17. <artifactId>common</artifactId>
  18. <version>0.0.1-SNAPSHOT</version>
  19. <exclusions>
  20. <exclusion>
  21. <groupId>org.springframework.boot</groupId>
  22. <artifactId>spring-boot-starter-web</artifactId>
  23. </exclusion>
  24. </exclusions>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.cloud</groupId>
  28. <artifactId>spring-cloud-starter-gateway</artifactId>
  29. </dependency>
  30. <dependency>
  31. <groupId>org.springframework.cloud</groupId>
  32. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  33. </dependency>
  34. <dependency>
  35. <groupId>org.springframework.cloud</groupId>
  36. <artifactId>spring-cloud-starter-config</artifactId>
  37. </dependency>
  38. <dependency>
  39. <groupId>com.github.xiaoymin</groupId>
  40. <artifactId>knife4j-spring-boot-starter</artifactId>
  41. </dependency>
  42. <dependency>
  43. <groupId>org.springframework.security</groupId>
  44. <artifactId>spring-security-config</artifactId>
  45. </dependency>
  46. <dependency>
  47. <groupId>org.springframework.security</groupId>
  48. <artifactId>spring-security-oauth2-resource-server</artifactId>
  49. </dependency>
  50. <dependency>
  51. <groupId>org.springframework.security</groupId>
  52. <artifactId>spring-security-oauth2-client</artifactId>
  53. </dependency>
  54. <dependency>
  55. <groupId>org.springframework.security</groupId>
  56. <artifactId>spring-security-oauth2-jose</artifactId>
  57. </dependency>
  58. <dependency>
  59. <groupId>com.nimbusds</groupId>
  60. <artifactId>nimbus-jose-jwt</artifactId>
  61. </dependency>
  62. </dependencies>
  63. <!-- <build>-->
  64. <!-- <plugins>-->
  65. <!-- <plugin>-->
  66. <!-- <groupId>org.springframework.boot</groupId>-->
  67. <!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
  68. <!-- </plugin>-->
  69. <!-- <plugin>-->
  70. <!-- <groupId>com.spotify</groupId>-->
  71. <!-- <artifactId>docker-maven-plugin</artifactId>-->
  72. <!-- </plugin>-->
  73. <!-- </plugins>-->
  74. <!-- </build>-->
  75. <!-- <build>-->
  76. <!-- <plugins>-->
  77. <!-- <plugin>-->
  78. <!-- <groupId>org.springframework.boot</groupId>-->
  79. <!-- <artifactId>spring-boot-maven-plugin</artifactId>-->
  80. <!-- </plugin>-->
  81. <!-- </plugins>-->
  82. <!-- <resources>-->
  83. <!-- <resource>-->
  84. <!-- <directory>src/main/java</directory>-->
  85. <!-- <includes>-->
  86. <!-- <include>**/*.properties</include>-->
  87. <!-- <include>**/*.xml</include>-->
  88. <!-- <include>**/*.json</include>-->
  89. <!-- </includes>-->
  90. <!-- <filtering>false</filtering>-->
  91. <!-- </resource>-->
  92. <!-- <resource>-->
  93. <!-- <directory>src/main/resources</directory>-->
  94. <!-- <includes>-->
  95. <!-- <include>**/*.*</include>-->
  96. <!-- </includes>-->
  97. <!-- </resource>-->
  98. <!-- </resources>-->
  99. <!-- <finalName>gateway-service</finalName>-->
  100. <!-- </build>-->
  101. <build>
  102. <plugins>
  103. <plugin>
  104. <groupId>org.springframework.boot</groupId>
  105. <artifactId>spring-boot-maven-plugin</artifactId>
  106. </plugin>
  107. <!-- 添加docker-maven插件 -->
  108. <plugin>
  109. <groupId>com.spotify</groupId>
  110. <artifactId>docker-maven-plugin</artifactId>
  111. <version>1.1.1</version>
  112. <configuration>
  113. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  114. <forceTags>true</forceTags>
  115. <!--镜像的FROM,使用压缩的小镜像-->
  116. <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
  117. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
  118. <resources>
  119. <resource>
  120. <targetPath>/</targetPath>
  121. <directory>${project.build.directory}</directory>
  122. <include>${project.build.finalName}.jar</include>
  123. </resource>
  124. </resources>
  125. <serverId>docker-registry</serverId>
  126. <registryUrl>${registryUrl}</registryUrl>
  127. </configuration>
  128. </plugin>
  129. </plugins>
  130. </build>
  131. </project>