pom.xml 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. <!--&lt;!&ndash;热部署引用&ndash;&gt;-->
  57. <!--<dependency>-->
  58. <!--<groupId>org.springframework.boot</groupId>-->
  59. <!--<artifactId>spring-boot-devtools</artifactId>-->
  60. <!--<optional>true</optional>-->
  61. <!--</dependency>-->
  62. <!--swagger-->
  63. <dependency>
  64. <groupId>io.springfox</groupId>
  65. <artifactId>springfox-swagger2</artifactId>
  66. </dependency>
  67. <dependency>
  68. <groupId>io.springfox</groupId>
  69. <artifactId>springfox-swagger-ui</artifactId>
  70. </dependency>
  71. </dependencies>
  72. <dependencyManagement>
  73. <dependencies>
  74. <dependency>
  75. <groupId>org.springframework.cloud</groupId>
  76. <artifactId>spring-cloud-dependencies</artifactId>
  77. <version>${spring-cloud.version}</version>
  78. <type>pom</type>
  79. <scope>import</scope>
  80. </dependency>
  81. </dependencies>
  82. </dependencyManagement>
  83. <build>
  84. <plugins>
  85. <plugin>
  86. <groupId>org.springframework.boot</groupId>
  87. <artifactId>spring-boot-maven-plugin</artifactId>
  88. </plugin>
  89. <!-- 添加docker-maven插件 -->
  90. <plugin>
  91. <groupId>com.spotify</groupId>
  92. <artifactId>docker-maven-plugin</artifactId>
  93. <configuration>
  94. <imageName>${docker.image.prefix}/${project.artifactId}:${project.version}</imageName>
  95. <forceTags>true</forceTags>
  96. <!--镜像的FROM,使用压缩的小镜像-->
  97. <baseImage>frolvlad/alpine-oraclejdk8:slim</baseImage>
  98. <entryPoint>["java", "-jar", "/${project.build.finalName}.jar"]</entryPoint>
  99. <resources>
  100. <resource>
  101. <targetPath>/</targetPath>
  102. <directory>${project.build.directory}</directory>
  103. <include>${project.build.finalName}.jar</include>
  104. </resource>
  105. </resources>
  106. <serverId>docker-registry</serverId>
  107. <registryUrl>http://192.168.2.236:5000/repository/diagbotcloud/</registryUrl>
  108. </configuration>
  109. </plugin>
  110. </plugins>
  111. </build>
  112. </project>