본문 바로가기

프로그래밍/SPRING8

Zuul API GATEWAY - 초간단 설정 Zuul API GATEWAY - 초간단 설정 Zuul이 뭐야? Zuul은 Netflix에서 개발한 Gateway 오픈 라이브러리 이다. Gateway 는 뭐야? zuul lib를 이용하여 Gateway 서버를 만들수 있다. ( proxy 서버라고 표현하기도 함. ) MSA 에서 클라이언트에게 분산된 서비스의 단일 진입점 즉, 이는 일종의 출입문 역할을 하며, 뒷단의 API 서버들에게 라우팅 할수 있다. 또한 보안과 인증, 로깅과 같은 횡단 관심사를 각 서비스 마다 적용하려면 힘이 들기때문에 이를 이용하면 편하게 처리할수 있다. 일반적으로 ureka 와 함꼐 사용하며 아래 2장의 그림이 본 것중에 제일 잘 정리된거 같아 퍼왔다. Eureka 서버에 등록된 API 서버들 Ureka 서버에 API 서버들이 .. 2022. 7. 14.
swagger3.0 404 not found swagger3.0 404 not found http://{BASE_URL}/swagger-ui.html 잘 호출 되던 녀석이 왜 404가 나오는 거니?? swagger 3.0 부터는 주소가 바꼇단다. http://{BASE_URL}/swagger-ui/index.html 2022. 5. 30.
swagger3.0 에러 발생 Failed to start bean 'documentationPluginsBootstrapper' swagger3.0 에러 발생 Failed to start bean 'documentationPluginsBootstrapper' Swagger를 적용하기 위해 build.gradle 에 dependencies에 추가 SwaggerConfig.java 문제 : Swagger 설정을 끝마쳤으나 아래와 같은 에러가 계속 발생 022-05-30 13:08:12.976 ERROR 376352 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed org.springframework.context.ApplicationContextException: Failed to start bean 'documentationPluginsBootstrap.. 2022. 5. 30.
[Spring boot] 간단 정리 REST API 버전 관리 방법(URI, Parameter, Header, mimetype ) [Spring boot] REST API 버전 관리 방법(URI, Request Parameter, Header, mimetype ) RestApi의 설계나 구조가 변경되거나, 기능이 변경되었을때 version이 변경될때 사용자에게 어떤 버전을 제공하는지 알려줄 필요가 있다. Rest Api 의 버전관리 방식 4가지에 대해 정리한다. 1) URI 방식 - 브라우저에서 실행 가능 ( twitter ) 가장 단순한 형태이기도 하면서 이해하기 쉽기도 하다. @GetMapping(path="/v1/users/{id}") public MappingJacksonValue retrieveUser(@PathVariable int id) { ... 생략 ... } @GetMapping("/v2/users/{id}") p.. 2022. 5. 25.
Spring boot - Failed to determine a suitable driver class Spring boot - Failed to determine a suitable driver class 1. 에러 내용 : 2022-05-20 14:31:06.670 DEBUG 270240 --- [ restartedMain] o.s.b.d.LoggingFailureAnalysisReporter :Application failed to start due to an exception org.springframework.boot.autoconfigure.jdbc.DataSourceProperties$DataSourceBeanCreationException : Failed to determine a suitable driver class -------중략------ ************************.. 2022. 5. 20.
@Size 어노테이션이 작동을 안할때 @Size 어노테이션이 작동을 안할때 아래와 같이 코드를 잤다. import lombok.AllArgsConstructor; import lombok.Data; @Data @AllArgsConstructor public class User { @Size(min=2) private Integer id; private String name; private Date joinDate; } @Size 어노테이션이 안는다. intellij problems 탭에 확인시 아래와같은 에러가 발생하고 있다. 1. 에러 발생 : 2. 해결 방법: @Size 어노테이션이 참조하고자하는 library가 없기 때문이다. dependencies를 추가해주고 해당 프로젝트를 다시 로드 해주면된다. maven프로젝트 의 경우 pom... 2022. 5. 20.