pom.xml 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152
  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. <!--knife4j-->
  66. <dependency>
  67. <groupId>com.github.xiaoymin</groupId>
  68. <artifactId>knife4j-spring-ui</artifactId>
  69. </dependency>
  70. <!-- 开启feign-->
  71. <!--<dependency>-->
  72. <!--<groupId>org.springframework.cloud</groupId>-->
  73. <!--<artifactId>spring-cloud-starter-openfeign</artifactId>-->
  74. <!--</dependency>-->
  75. <dependency>
  76. <groupId>org.springframework.cloud</groupId>
  77. <artifactId>spring-cloud-loadbalancer</artifactId>
  78. </dependency>
  79. <dependency>
  80. <groupId>org.springframework.cloud</groupId>
  81. <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
  82. </dependency>
  83. <dependency>
  84. <groupId>org.springframework.cloud</groupId>
  85. <artifactId>spring-cloud-starter-stream-rabbit</artifactId>
  86. </dependency>
  87. <!-- 必须加上,jedis依赖此 -->
  88. <dependency>
  89. <groupId>org.apache.commons</groupId>
  90. <artifactId>commons-pool2</artifactId>
  91. </dependency>
  92. <dependency>
  93. <groupId>com.diagbot</groupId>
  94. <artifactId>common</artifactId>
  95. <version>0.0.1-SNAPSHOT</version>
  96. </dependency>
  97. </dependencies>
  98. <dependencyManagement>
  99. <dependencies>
  100. <dependency>
  101. <groupId>org.springframework.cloud</groupId>
  102. <artifactId>spring-cloud-dependencies</artifactId>
  103. <version>${spring-cloud.version}</version>
  104. <type>pom</type>
  105. <scope>import</scope>
  106. </dependency>
  107. </dependencies>
  108. </dependencyManagement>
  109. <build>
  110. <plugins>
  111. <plugin>
  112. <groupId>org.springframework.boot</groupId>
  113. <artifactId>spring-boot-maven-plugin</artifactId>
  114. </plugin>
  115. <!-- 添加docker-maven插件 -->
  116. <plugin>
  117. <groupId>com.spotify</groupId>
  118. <artifactId>docker-maven-plugin</artifactId>
  119. <configuration>
  120. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  121. <forceTags>true</forceTags>
  122. <!--镜像的FROM,使用压缩的小镜像-->
  123. <baseImage>frolvlad/alpine-oraclejre8:slim</baseImage>
  124. <entryPoint>["java", "-jar", "-Xms256m", "-Xmx1024m", "-Duser.timezone=GMT+8", "/${project.build.finalName}.jar"]</entryPoint>
  125. <resources>
  126. <resource>
  127. <targetPath>/</targetPath>
  128. <directory>${project.build.directory}</directory>
  129. <include>${project.build.finalName}.jar</include>
  130. </resource>
  131. </resources>
  132. <serverId>docker-registry</serverId>
  133. <registryUrl>${registryUrl}</registryUrl>
  134. </configuration>
  135. </plugin>
  136. </plugins>
  137. </build>
  138. </project>