123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152 |
- <?xml version="1.0" encoding="UTF-8"?>
- <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
- <modelVersion>4.0.0</modelVersion>
-
- <artifactId>spring5-gateway</artifactId>
- <packaging>jar</packaging>
- <name>${project.artifactId}</name>
- <description>spring5 demo</description>
-
- <!-- Spring Boot 启动父依赖 -->
- <parent>
- <groupId>com.yaozhitech</groupId>
- <artifactId>spring5</artifactId>
- <version>0.1.0</version>
- </parent>
- <dependencies>
-
- <!-- 网关 -->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-gateway</artifactId>
- </dependency>
-
- <!-- hystrix -->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
- </dependency>
-
- <!-- 最新推荐的断路器 -->
- <!-- <dependency> -->
- <!-- <groupId>org.springframework.cloud</groupId> -->
- <!-- <artifactId>spring-cloud-starter-circuitbreaker-reactor-resilience4j</artifactId> -->
- <!-- </dependency> -->
-
- <!-- Spring Boot Web Flux 依赖 -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-webflux</artifactId>
- </dependency>
-
- <!-- Spring Boot 响应式 Redis 依赖 -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-data-redis-reactive</artifactId>
- </dependency>
-
- <dependency>
- <groupId>com.alicp.jetcache</groupId>
- <artifactId>jetcache-starter-redis</artifactId>
- <version>2.6.0.M3</version>
- </dependency>
- <dependency>
- <groupId>com.alicp.jetcache</groupId>
- <artifactId>jetcache-redis-lettuce</artifactId>
- <version>2.6.0.M3</version>
- </dependency>
-
- <!-- Spring test 依赖 -->
- <dependency>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-starter-test</artifactId>
- <scope>test</scope>
- </dependency>
-
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- 集成wireMock来实现mock请求响应。wireMock会自动构建一个虚拟远程服务 -->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-contract-wiremock</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- 提供打包预定义数据服务 -->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-contract-stub-runner</artifactId>
- <scope>test</scope>
- </dependency>
-
- <!-- 自动生成单元测试代码 -->
- <dependency>
- <groupId>org.springframework.cloud</groupId>
- <artifactId>spring-cloud-starter-contract-verifier</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.github.tomakehurst</groupId>
- <artifactId>wiremock-standalone</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
- <build>
- <plugins>
- <!--docker镜像build插件-->
- <plugin>
- <groupId>com.spotify</groupId>
- <artifactId>docker-maven-plugin</artifactId>
- <version>1.2.0</version>
- <configuration>
- <!-- 注意imageName一定要是符合正则[a-z0-9-_.]的,否则构建不会成功 -->
- <imageName>yaozhitech/${project.artifactId}</imageName>
- <dockerDirectory>${project.basedir}/src/main/docker</dockerDirectory>
- <rm>true</rm>
- <resources>
- <resource>
- <targetPath>/</targetPath>
- <directory>${project.build.directory}</directory>
- <include>${project.build.finalName}.jar</include>
- </resource>
- </resources>
- </configuration>
- </plugin>
-
- <!-- 打包时跳过单元测试 -->
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skipTests>true</skipTests>
- </configuration>
- </plugin>
-
- <plugin>
- <groupId>org.springframework.boot</groupId>
- <artifactId>spring-boot-maven-plugin</artifactId>
- <version>2.1.4.RELEASE</version>
- <executions>
- <execution>
- <goals>
- <goal>build-info</goal>
- <goal>repackage</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- </project>
|