引入Nacos服务注册与发现
This commit is contained in:
		@@ -2,10 +2,12 @@ package com.cxyxiaomo.epp;
 | 
			
		||||
 | 
			
		||||
import org.springframework.boot.SpringApplication;
 | 
			
		||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
 | 
			
		||||
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
 | 
			
		||||
 | 
			
		||||
// 启动类
 | 
			
		||||
 | 
			
		||||
@SpringBootApplication
 | 
			
		||||
@EnableDiscoveryClient
 | 
			
		||||
public class TestProvider {
 | 
			
		||||
    public static void main(String[] args) {
 | 
			
		||||
        SpringApplication.run(TestProvider.class, args);
 | 
			
		||||
 
 | 
			
		||||
@@ -5,3 +5,7 @@ server:
 | 
			
		||||
spring:
 | 
			
		||||
  application:
 | 
			
		||||
    name: microservice-provider-test
 | 
			
		||||
  cloud:
 | 
			
		||||
    nacos:
 | 
			
		||||
      discovery:
 | 
			
		||||
        server-addr: 127.0.0.1:8848
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user