728x90 728x90 SWAGGER2 [Spring; 스프링] Spring MVC 자동구성 제어 / WebMvcConfigurer vs WebMvcConfigurationSupport / Swagger Spring Boot Version : 3.2.1 Java Version : 17 Swagger : 2.3.0 // swagger implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.3.0' 새로운 프로젝트를 스프링부트 3.x 버전으로 해보고싶어서 간단하게 Controller, Service, Repository, Entity, Dto 등을 만들고 Security 설정을 해주고 Swagger 관련 설정들도 해줬다. 내 생각엔 모든게 완벽해 보였다. 하지만 스웨거 작동이 뭔가 삐걱거렸다. 내가 설정한 /v3/api-docs 가 나오는게 아니고 기본 페이지인 petstore 가 자꾸 기본으로 나오는것이다. "https://petstore... 2024. 1. 5. [Spring; 스프링] Swagger 설정 Spring Boot 프로젝트에서 Swagger를 설정하는 방법은 다음과 같습니다. 1. Maven 또는 Gradle 의존성 추가 Maven: io.springfox springfox-boot-starter 3.0.0 Gradle: implementation 'io.springfox:springfox-boot-starter:3.0.0' // 현재 사용 가능한 최신 버전으로 업데이트하세요 2. Swagger 설정 클래스 생성 import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import springfox.documentation.builders.ApiInf.. 2023. 10. 24. 이전 1 다음 728x90 728x90