🚨chore: openfeign 사용 준비 및 샘플 추가

- 파일 재 수정
This commit is contained in:
yoosangwook 2024-12-10 09:06:47 +09:00
parent ce94751764
commit 22e422f12c
3 changed files with 32 additions and 4 deletions

19
pom.xml
View File

@ -15,6 +15,7 @@
<description>qcast</description>
<properties>
<java.version>17</java.version>
<spring-cloud.version>2023.0.2</spring-cloud.version>
</properties>
<dependencies>
<!-- Spring Boot Start -->
@ -26,6 +27,10 @@
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-batch</artifactId>
@ -103,7 +108,7 @@
<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-starter-webmvc-ui</artifactId>
<version>2.6.0</version>
<version>2.3.0</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.commons/commons-lang3 -->
@ -189,6 +194,18 @@
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<plugins>
<plugin>

View File

@ -1,4 +1,11 @@
package com.interplug.qcast.biz.master.dto;
public class MasterService {
import org.springframework.cloud.openfeign.FeignClient;
// @FeignClient(name = "master", url = "${feign.master.url}")
@FeignClient(name = "master", url = "http://localhost:8081/api")
public interface MasterService {
// @GetMapping("/sample")
// public List<SampleResponse> getSamepleList();
}

View File

@ -1,4 +1,8 @@
package com.interplug.qcast.config.openfeign;
public class OpenFeignConfig {
}
import org.springframework.cloud.openfeign.EnableFeignClients;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableFeignClients(basePackages = "com.interplug.qcast.biz.master")
public class OpenFeignConfig {}