nacos2.0案例(2)注册服务器应用
启动Nacos2.0服务
创建总工程并初始化POM
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.hhd</groupId>
<artifactId>hhd-hplat</artifactId>
<packaging>pom</packaging>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
<druid.version>1.1.1</druid.version>
<spring-boot.version>2.3.8.RELEASE</spring-boot.version>
<spring-boot-maven-plugin.version>2.3.8.RELEASE</spring-boot-maven-plugin.version>
<spring-cloud.version>Hoxton.SR9</spring-cloud.version>
<com-alibaba-cloud.version>2.2.5.RELEASE</com-alibaba-cloud.version>
<springfox-swagger.version>2.9.2</springfox-swagger.version>
<swagger-bootstrap-ui.version>1.9.6</swagger-bootstrap-ui.version>
<!-- <springfox-swagger.version>2.10.5</springfox-swagger.version>-->
<!-- <springfox-swagger.version>3.0.0</springfox-swagger.version>-->
<env.DOCKER_HOST>192.168.34.2</env.DOCKER_HOST>
<spring-redis.version>1.8.18.RELEASE</spring-redis.version>
<java.version>1.8</java.version>
<env.DOCKER_HOST>192.168.33.103</env.DOCKER_HOST>
</properties>
<modules>
<module>hhd-hplat-provider</module>
<module>hhd-hplat-consumer</module>
</modules>
<dependencyManagement>
<dependencies>
<dependency>
<!-- Import dependency management from Spring Boot -->
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-dependencies</artifactId>
<version>${spring-boot.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-alibaba-dependencies</artifactId>