|
@@ -13,18 +13,36 @@
|
|
|
<version>0.0.1-SNAPSHOT</version>
|
|
|
<name>generic-parent</name>
|
|
|
<description>generic-parent</description>
|
|
|
+
|
|
|
+<!-- 建立父子 Module依赖-->
|
|
|
+ <packaging>pom</packaging>
|
|
|
+
|
|
|
+ <modules>
|
|
|
+
|
|
|
+ </modules>
|
|
|
+
|
|
|
<properties>
|
|
|
+
|
|
|
<java.version>1.8</java.version>
|
|
|
+
|
|
|
+ <!--springCloud版本-->
|
|
|
+ <spring-cloud.version>2021.0.1</spring-cloud.version>
|
|
|
+
|
|
|
</properties>
|
|
|
+
|
|
|
<dependencies>
|
|
|
+<!-- mongodb-->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-data-mongodb</artifactId>
|
|
|
</dependency>
|
|
|
+
|
|
|
+<!-- redis-->
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-data-redis-reactive</artifactId>
|
|
|
</dependency>
|
|
|
+
|
|
|
<dependency>
|
|
|
<groupId>org.springframework.boot</groupId>
|
|
|
<artifactId>spring-boot-starter-web</artifactId>
|
|
@@ -35,13 +53,73 @@
|
|
|
<artifactId>spring-boot-starter-test</artifactId>
|
|
|
<scope>test</scope>
|
|
|
</dependency>
|
|
|
+
|
|
|
<dependency>
|
|
|
<groupId>io.projectreactor</groupId>
|
|
|
<artifactId>reactor-test</artifactId>
|
|
|
<scope>test</scope>
|
|
|
</dependency>
|
|
|
+
|
|
|
+ <!--zuul依赖 -->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-netflix-zuul</artifactId>
|
|
|
+ <version>2.2.6.RELEASE</version>
|
|
|
+ </dependency>
|
|
|
+ <!--ribbon-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
|
|
+ <version>2.2.6.RELEASE</version>
|
|
|
+ </dependency>
|
|
|
+
|
|
|
+ <!--Nacos依赖-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.alibaba.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
|
|
|
+ <version>2.2.6.RELEASE</version>
|
|
|
+ <!--openfeign里面有复载均衡,所以这里必须注释掉,不然会冲突-->
|
|
|
+ <exclusions>
|
|
|
+ <exclusion>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-netflix-ribbon</artifactId>
|
|
|
+ </exclusion>
|
|
|
+ </exclusions>
|
|
|
+ </dependency>
|
|
|
+
|
|
|
+ <dependency>
|
|
|
+ <groupId>com.alibaba.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-alibaba-nacos-config</artifactId>
|
|
|
+ <version>2.2.6.RELEASE</version>
|
|
|
+ </dependency>
|
|
|
+
|
|
|
+ <!--openfeign依赖 Feign的注解定义接口,调用这个接口,就可以调用服务注册中心的服务-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-starter-openfeign</artifactId>
|
|
|
+ </dependency>
|
|
|
+
|
|
|
+ <!--openfiegn使用时需要搭配loadbalancer负载均衡-->
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-loadbalancer</artifactId>
|
|
|
+ </dependency>
|
|
|
</dependencies>
|
|
|
|
|
|
+ <dependencyManagement>
|
|
|
+ <!--springBoot的核心依赖,也是继承,可插拔机制,只会加载配置的依赖-->
|
|
|
+ <dependencies>
|
|
|
+ <dependency>
|
|
|
+ <groupId>org.springframework.cloud</groupId>
|
|
|
+ <artifactId>spring-cloud-dependencies</artifactId>
|
|
|
+ <version>${spring-cloud.version}</version>
|
|
|
+ <type>pom</type>
|
|
|
+ <scope>import</scope>
|
|
|
+ </dependency>
|
|
|
+ </dependencies>
|
|
|
+ </dependencyManagement>
|
|
|
+
|
|
|
+
|
|
|
<build>
|
|
|
<plugins>
|
|
|
<plugin>
|