|
|
@@ -3,6 +3,7 @@ package com.unissoft;
|
|
3
|
3
|
import org.springframework.boot.SpringApplication;
|
|
4
|
4
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
5
|
5
|
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
|
6
|
+import org.springframework.cloud.openfeign.EnableFeignClients;
|
|
6
|
7
|
|
|
7
|
8
|
/**
|
|
8
|
9
|
* 文件描述
|
|
|
@@ -11,6 +12,7 @@ import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
|
|
11
|
12
|
* @date 2020年11月17日 15:04
|
|
12
|
13
|
*/
|
|
13
|
14
|
@SpringBootApplication
|
|
|
15
|
+@EnableFeignClients
|
|
14
|
16
|
@EnableDiscoveryClient//注册中心能够发现,扫描到改服务;不同点:@EnableEurekaClient只适用于Eureka作为注册中心,@EnableDiscoveryClient 可以是其他注册中心
|
|
15
|
17
|
public class GatewayStart {
|
|
16
|
18
|
public static void main(String[] args) {
|