pom.xml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <project xmlns="http://maven.apache.org/POM/4.0.0"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
  5. <modelVersion>4.0.0</modelVersion>
  6. <groupId>com.diagbot</groupId>
  7. <artifactId>gateway-service</artifactId>
  8. <version>0.0.1-SNAPSHOT</version>
  9. <packaging>jar</packaging>
  10. <name>gateway-service</name>
  11. <description>Gateway service project for Spring Boot</description>
  12. <parent>
  13. <groupId>com.diagbot</groupId>
  14. <artifactId>diagbotcloud</artifactId>
  15. <version>0.0.1-SNAPSHOT</version>
  16. </parent>
  17. <dependencies>
  18. <dependency>
  19. <groupId>org.springframework.boot</groupId>
  20. <artifactId>spring-boot-starter-actuator</artifactId>
  21. </dependency>
  22. <dependency>
  23. <groupId>org.springframework.cloud</groupId>
  24. <artifactId>spring-cloud-starter-gateway</artifactId>
  25. </dependency>
  26. <dependency>
  27. <groupId>org.springframework.boot</groupId>
  28. <artifactId>spring-boot-starter-data-redis-reactive</artifactId>
  29. </dependency>
  30. <!-- 配置-->
  31. <dependency>
  32. <groupId>org.springframework.cloud</groupId>
  33. <artifactId>spring-cloud-starter-config</artifactId>
  34. </dependency>
  35. <dependency>
  36. <groupId>org.springframework.cloud</groupId>
  37. <artifactId>spring-cloud-starter</artifactId>
  38. </dependency>
  39. <dependency>
  40. <groupId>org.springframework.cloud</groupId>
  41. <artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
  42. </dependency>
  43. <dependency>
  44. <groupId>net.logstash.logback</groupId>
  45. <artifactId>logstash-logback-encoder</artifactId>
  46. </dependency>
  47. <dependency>
  48. <groupId>org.springframework.cloud</groupId>
  49. <artifactId>spring-cloud-starter-bus-amqp</artifactId>
  50. </dependency>
  51. <dependency>
  52. <groupId>org.projectlombok</groupId>
  53. <artifactId>lombok</artifactId>
  54. <optional>true</optional>
  55. </dependency>
  56. <!--swagger-->
  57. <dependency>
  58. <groupId>io.springfox</groupId>
  59. <artifactId>springfox-swagger2</artifactId>
  60. </dependency>
  61. <dependency>
  62. <groupId>io.springfox</groupId>
  63. <artifactId>springfox-swagger-ui</artifactId>
  64. </dependency>
  65. <!-- 开启feign-->
  66. <dependency>
  67. <groupId>org.springframework.cloud</groupId>
  68. <artifactId>spring-cloud-starter-openfeign</artifactId>
  69. </dependency>
  70. <dependency>
  71. <groupId>org.springframework.cloud</groupId>
  72. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  73. </dependency>
  74. <dependency>
  75. <groupId>org.springframework.cloud</groupId>
  76. <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
  77. </dependency>
  78. <dependency>
  79. <groupId>com.diagbot</groupId>
  80. <artifactId>common</artifactId>
  81. <version>0.0.1-SNAPSHOT</version>
  82. </dependency>
  83. </dependencies>
  84. <dependencyManagement>
  85. <dependencies>
  86. <dependency>
  87. <groupId>org.springframework.cloud</groupId>
  88. <artifactId>spring-cloud-dependencies</artifactId>
  89. <version>${spring-cloud.version}</version>
  90. <type>pom</type>
  91. <scope>import</scope>
  92. </dependency>
  93. </dependencies>
  94. </dependencyManagement>
  95. <build>
  96. <plugins>
  97. <plugin>
  98. <groupId>org.springframework.boot</groupId>
  99. <artifactId>spring-boot-maven-plugin</artifactId>
  100. </plugin>
  101. <!-- 添加docker-maven插件 -->
  102. <plugin>
  103. <groupId>com.spotify</groupId>
  104. <artifactId>docker-maven-plugin</artifactId>
  105. <configuration>
  106. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  107. <forceTags>true</forceTags>
  108. <!--镜像的FROM,使用压缩的小镜像-->
  109. <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
  110. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
  111. <resources>
  112. <resource>
  113. <targetPath>/</targetPath>
  114. <directory>${project.build.directory}</directory>
  115. <include>${project.build.finalName}.jar</include>
  116. </resource>
  117. </resources>
  118. <serverId>docker-registry</serverId>
  119. <registryUrl>${registryUrl}</registryUrl>
  120. </configuration>
  121. </plugin>
  122. </plugins>
  123. </build>
  124. </project>