API 호출 테스트를 위한 swagger-ui 세팅 진행
1. 의존성 추가
val springdocVersion = "2.8.9"
dependencies {
.....
// Swagger
implementation("org.springdoc:springdoc-openapi-starter-webmvc-ui:$springdocVersion")
.....
}
2. 프로퍼티 설정 추가
springdoc:
cache:
disabled: true
default-consumes-media-type: application/json
default-produces-media-type: application/json
---
spring:
config:
activate:
on-profile: local
springdoc:
swagger-ui:
path: /swagger-ui.html # 접속 경로
tags-sorter: alpha # 태그 알파벳 정렬
operations-sorter: method # GET, POST, 등 정렬
doc-expansion: none # 태그 펼침 여부
api-docs:
path: /api/v3/api-docs
spring:
application:
name: safehome
config:
import:
- classpath:application-db.yml
- classpath:application-swagger.yml
3. swagger config 는 나중에 필요하면 작성
'개발일지' 카테고리의 다른 글
| [개발일지_safeHome] 11. redis 세팅 추가 (0) | 2025.12.29 |
|---|---|
| [개발일지_safeHome] 10. 등기부등본 분석 설계는 어떻게 할 것인가? (0) | 2025.12.29 |
| [개발일지_safeHome] 8. Custom Exception 개발 (0) | 2025.12.28 |
| [개발일지_safeHome] 7. sample 도메인 개발 (adapter, usecase, repository, 등등.....) (0) | 2025.12.23 |
| [개발일지_safeHome] 6.JPA Audit 설정 추가 (0) | 2025.12.15 |