pom

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
<java.version>1.8</java.version>
<shiro.version>1.7.1</shiro.version><!-- fhadmin.cn -->
<spring-cloud.version>2020.0.3</spring-cloud.version>
<spring-cloud-Alibaba.version>2021.1</spring-cloud-Alibaba.version>
<maven-jar-plugin.version>3.0.0</maven-jar-plugin.version>
</properties>


<dependencyManagement>
<dependencies>
<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>
<version>${spring-cloud-Alibaba.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>


<dependencies>
<!-- nacos注册中心fhadmin.cn -->
<dependency>
<groupId>com.alibaba.cloud</groupId><!-- fhadmin.cn -->
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
</dependency>
</dependencies>

application.properties

#nacos指向注册中心 fhadmin.cn
spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848
#nacos访问地址的用户名
spring.cloud.nacos.discovery.username=nacos
#nacos访问地址的密-码
spring.cloud.nacos.discovery.password=nacos