xddpy 如何配置====》https://github.com/alibaba/spring-cloud-alibaba ====》 Nacos Discovery
pom.xml引入依赖:
<dependency> <groupId>com.alibaba.cloud</groupId> <artifactId>spring-cloud-starter-alibaba-nacos-discovery</artifactId></dependency>
nacos官网下载nacos,下载zip版本启动 用户名密码默认nacos
application.yml配置:spring.cloud.nacos.discovery.server-addr=127.0.0.1:8848spring.application.name: xxxx @SpringBootApplication@EnableDiscoveryClientpublic class NacosProviderDemoApplication { public static void main(String[] args) { SpringApplication.run(NacosProviderDemoApplication.class, args); } @RestController public class EchoController { @GetMapping(value = “/echo/{string}”) public String echo(@PathVariable String string) { return “Hello Nacos Discovery ” + string; } }}