[공부] 프로그래밍
-
Feign Client 구현 - 3[공부] 프로그래밍/Spring・Spring Boot (JAVA) 2024. 5. 22. 10:26
♧ 전체 코드 : https://github.com/woodisco/feign-client GitHub - woodisco/feign-client: feign-client 공부feign-client 공부. Contribute to woodisco/feign-client development by creating an account on GitHub.github.com Logger 구현① FeignCustomLogger 작성@RequiredArgsConstructorpublic class FeignCustomLogger extends Logger { @Override protected void log(String configKey, String format, Object... args) { ..
-
Feign Client 구현 - 2[공부] 프로그래밍/Spring・Spring Boot (JAVA) 2024. 5. 21. 14:52
♧ 전체 코드 : https://github.com/woodisco/feign-client GitHub - woodisco/feign-client: feign-client 공부feign-client 공부. Contribute to woodisco/feign-client development by creating an account on GitHub.github.com Interceptor 구현외부로 요청이 나가지 전에 만약 공통적으로 처리를 해야하는 부분이 있다면 Interceptor를 재정의 하여 처리 가능하다.① DemoFeignInterceptor 작성@RequiredArgsConstructor(staticName = "of")public class DemoFeignInterceptor implem..
-
Feign Client 구현 - 1[공부] 프로그래밍/Spring・Spring Boot (JAVA) 2024. 5. 21. 11:29
♧ 전체 코드 : https://github.com/woodisco/feign-client GitHub - woodisco/feign-client: feign-client 공부feign-client 공부. Contribute to woodisco/feign-client development by creating an account on GitHub.github.com Feign ClientHTTP API 호출을 인터페이스 기반으로 쉽게 할 수 있게 해주는 클라이언트입니다. Feign을 사용하면 REST API 호출을 위한 코드 작성을 대폭 줄일 수 있습니다. 인터페이스에 메서드와 HTTP 메서드, URL 매핑을 정의하면, Feign이 이를 구현하여 실제 HTTP 요청을 수행합니다.Connection/Re..
-
[error] Invalid value type for attribute 'factoryBeanObjectType': java.lang.String[공부] 프로그래밍/ERROR 2024. 5. 21. 11:03
Invalid value type for attribute 'factoryBeanObjectType': java.lang.Stringfeign-client를 사용하기 위해 build.gradle에 아래와 같은 디펜던시를 추가해주었다.ext { // Feign set('springCloudVersion', '2021.0.3') set('commonsLangVersion', '3.12.0')}dependencyManagement { imports { mavenBom "org.springframework.cloud:spring-cloud-dependencies:${springCloudVersion}" }}// Feignimplementation 'org.springframework.cloud:spring-c..
-
비동기 프로그래밍 구현[공부] 프로그래밍/Spring・Spring Boot (JAVA) 2024. 5. 20. 12:42
♧ 전체 코드 : https://github.com/woodisco/Async GitHub - woodisco/Async: async 공부async 공부. Contribute to woodisco/Async development by creating an account on GitHub.github.com Spring에서 비동기 프로그래밍을 하기 위해서는 ThreadPool을 정의할 필요가 있다. ▷ ThreadPool을 생성해야 하는 이유?=> 비동기는 Main Thread가 아닌 Sub Thread에서 작업을 진행하며 Java에서는 ThreadPool을 생성하여 Async 작업을 처리한다.▷ ThreadPool 생성 옵션CorePoolSize : 최소한의 Thread를 몇개를 가기고 있을 것이냐를 지..
-
Spring Multi Module 구현[공부] 프로그래밍/Spring・Spring Boot (JAVA) 2024. 5. 16. 16:22
♧ 전체 코드 : https://github.com/woodisco/multi-module GitHub - woodisco/multi-moduleContribute to woodisco/multi-module development by creating an account on GitHub.github.com ◇ Git Flow 전략git을 사용하는 개발 환경에서 branch간 문제없이 배포를 안전적으로 할 수 있도록 branch를 관리하는 전략이다.・ main(master) : 실제 운영 환경에 있는 코드 브랜치・ dev : main 브랜치를 베이스로 생성한 브랜치, 다음 배포에 나갈 코드 브랜치・ feature : 각 개발 브랜치, dev 브랜치에 머지・ release : dev 브랜치를 베이스로 생성..