Spring boot 2.1.9 + Dubbo 2.7.3 + Nacos 1.1.4 构建微服务系统
-
Spring boot 2.1.9 + Dubbo 2.7.3 + Nacos 1.1.4 构建微服务系统 , mydemo
-
下载最新版本的 Nacos Server , 具体参见下面 注册中心部分
#启动 Nacos 服务 sh startup.sh -m standalone
-
parent pom
<modelVersion>4.0.0</modelVersion> <packaging>pom</packaging> <modules> <module>dubbo-api</module> <module>dubbo-provider</module> <module>dubbo-consumer</module> </modules> <groupId>com.example</groupId> <artifactId>dubbo-demo</artifactId> <version>1.0-SNAPSHOT</version> <properties> <spring-boot.version>2.1.9.RELEASE</spring-boot.version> <dubbo.version>2.7.3</dubbo.version> <nacos-config-spring-boot.version>0.2.1</nacos-config-spring-boot.version> <java.version>1.8</java.version> <maven.compiler.source>1.8</maven.compiler.source> <maven.compiler.target>1.8</maven.compiler.target> </properties> <dependencyManagement> <dependencies> <!--SpringBoot--> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> <version>${spring-boot.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- Apache Dubbo --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-dependencies-bom</artifactId> <version>${dubbo.version}</version> <type>pom</type> <scope>import</scope> </dependency> <!-- Dubbo Spring Boot Starter --> <dependency> <groupId>org.apache.dubbo</groupId> <artifactId>dubbo-spring-boot-starter</artifactId> <version>${dubbo.version}</version> </dependency></
-