Notice
Recent Posts
Recent Comments
Link
«   2024/05   »
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31
Archives
Today
Total
관리 메뉴

아님말고

spring cloud gateway 에서의 swagger 사용시 주의 본문

Java

spring cloud gateway 에서의 swagger 사용시 주의

스타박씨 2023. 8. 9. 11:07

[환경] spring boot : 2.7.5

swagger는 springfox 와 springdoc이 있는데, 여기서는 springdoc을 이용한다.

 

[실패]  아래와 같이 의존성을 추가하여 /swagger-ui/index.html을 실행하면 404 오류가 발생한다.

implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
implementation 'org.springdoc:springdoc-openapi-ui:1.6.15'

 

[해결] gateway는 webflux을 사용하기에 springdoc 의존성을 변경하여 실행하니 성공

implementation 'org.springframework.cloud:spring-cloud-starter-gateway'
implementation 'org.springdoc:springdoc-openapi-webflux-ui:1.6.15'

 

※참고  : java - Swagger API documentation in an API gateway (spring-cloud-starter-gateway) does not work (Whitelabel Error Page) - Stack Overflow

'Java' 카테고리의 다른 글

[AWS] DynamoDB + local 설치  (0) 2023.08.22
Swagger + Spring Boot 3  (0) 2023.08.18
[AWS] DynamoDB + Spring boot 연동하기  (0) 2023.08.03
[AWS] AWS SDK For Java 버전1과 2의 차이  (0) 2023.08.02
[gradle] spring boot + XSS filter 설정  (0) 2023.05.31
Comments