add feignClient

This commit is contained in:
renxiaoyin 2023-04-04 16:55:40 +08:00
parent 99815b41d8
commit a84348c95c
3 changed files with 17 additions and 1 deletions

View File

@ -46,6 +46,7 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>com.netflix.graphql.dgs</groupId>
<artifactId>graphql-dgs-spring-boot-starter</artifactId>
@ -84,7 +85,11 @@
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<version>2.1.3.RELEASE</version>
</dependency>
</dependencies>
<build>

View File

@ -2,8 +2,10 @@ package com.longfor.bff_netflix;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
@SpringBootApplication
@EnableFeignClients
public class BffNetflixApplication {
public static void main(String[] args) {

View File

@ -0,0 +1,9 @@
package com.longfor.bff_netflix.client;
import org.springframework.cloud.openfeign.FeignClient;
@FeignClient("shop")
public interface ShopClient {
}