본문 바로가기
스프링

Springboot3 + Swagger, Whitelabel 해결

by 순원이 2024. 6. 24.

 

[버전 주의]

스프링3을 쓰는 분들은  Springdoc  2.x.x를 써야한다. 

Swagger --   springfox(옛날 버전 / 업데이트 멈춤)
               |
               |--  springdoc(최신버전)

    //swager
	implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2'

이하 버전을 쓰거나 다른 dependenci를 받게된다면 Whitelabel Page가 뜰 것이다. 

 

만약 버전을 맞게 했는데도 해결이 안되었다면 접속 URL를 확인해보세요!

 

 

[어노테이션 마이그레이션]

 

[한글 깨짐 오류]

 

소스코드르 빌딩할 때 UTF-8로 안되어 있어서 그렇다 

File -> Setting -> File Encodings 

 

 

다른 궁금점들은 공식문서를 참고하시길 바랍니다. 뭐니뭐니 해도 공식문서가 짱입니다~ 

 

https://springdoc.org/#how-can-i-hide-an-operation-or-a-controller-from-documentation

 

OpenAPI 3 Library for spring-boot

Library for OpenAPI 3 with spring boot projects. Is based on swagger-ui, to display the OpenAPI description.Generates automatically the OpenAPI file.

springdoc.org