nacos版本1.1.3
1.renren-fast项目pom.xml中添加依赖
<dependency>
<groupId>com.alibaba.boot</groupId>
<artifactId>nacos-config-spring-boot-starter</artifactId>
<version>0.2.2</version>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId>
<version>0.9.0.RELEASE</version>
</dependency>
2.application-dev.yml添加配置信息
nacos:
config:
server-addr: ip:8848
namespace: XXX
spring:
application:
name: demo
cloud:
nacos:
discovery:
server-addr: ip:8848
namespace: XXX