add:实现Fiegin 功能

master
msb_89821 2 years ago
parent abeb57e19a
commit c149e09009

@ -49,6 +49,10 @@
3.3.2 3.3.2
</version> </version>
</dependency> </dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
</dependencies> </dependencies>
<build> <build>

@ -3,6 +3,7 @@ package com.mashibing.service.map;
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; import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.web.client.RestTemplate; import org.springframework.web.client.RestTemplate;
@ -21,6 +22,7 @@ import org.springframework.web.client.RestTemplate;
*/ */
@SpringBootApplication @SpringBootApplication
@EnableDiscoveryClient @EnableDiscoveryClient
@EnableFeignClients
public class ServiceMapApplication { public class ServiceMapApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(ServiceMapApplication.class,args); SpringApplication.run(ServiceMapApplication.class,args);

Loading…
Cancel
Save