|
@@ -2,12 +2,16 @@ package com.caimei365.user;
|
|
|
|
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.SpringApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
|
|
+import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
|
|
|
|
/**
|
|
/**
|
|
|
|
+ * `@EnableEurekaClient`: 声明一个Eureka客户端,只能注册到Eureka Server
|
|
|
|
+ * `@EnableDiscoveryClient`: 声明一个可以被发现的客户端,可以是其他注册中心
|
|
*
|
|
*
|
|
* @author : Charles
|
|
* @author : Charles
|
|
* @date : 2021/2/22
|
|
* @date : 2021/2/22
|
|
*/
|
|
*/
|
|
|
|
+@EnableDiscoveryClient
|
|
@SpringBootApplication
|
|
@SpringBootApplication
|
|
public class UserApplication {
|
|
public class UserApplication {
|
|
|
|
|