1. 启动Nacos

    cd nacoscd bin./startup.sh -m standalone
  2. 浏览器访问http://localhost:8848

    账号密码都是nacos

  3. 修改配置文件

    <dependency><groupId>com.alibaba.cloud</groupId><artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId><version>2.1.1.RELEASE</version></dependency>
  4. 修改配置文件

    spring:nacos:discovery:server-addr:localhost:8848