spring:
// Mysql RDS 설정 관련
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${DB_URL}
username: ${DB_USER}
password: ${DB_PASSWORD}
// 데이터베이스 버전 관리
flyway:
enabled: true
baseline-on-migrate: true
locations: classpath:db/migration, classpath:db/seed // DDL - migration, seed 데이터
// JPA 설정
jpa:
open-in-view: false
hibernate:
ddl-auto: validate //Flyway로 관리하므로
naming.physical-strategy: org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy
database-platform: org.hibernate.dialect.MySQL8Dialect
servlet:
multipart:
maxFileSize: 5MB
maxRequestSize: 5MB
// 스웨거 문서 설정
springdoc:
swagger-ui:
path: /swagger-monthsub.html
tagsSorter: alpha
operationsSorter: alpha // 정렬기준
oauth:
client-secret:
server:
servlet:
encoding:
charset: UTF-8
enabled: true
force: true
port: ${PORT:8080} //기본은 8080이며 env에 port를 적으면 그 번호로 동작함.
forward-headers-strategy: framework // 스웨거에서 TEST할 때 HTTP 환경이면 HTTP로 HTTPS면 HTTPS로 포워딩
// AWS 설정
cloud:
aws:
credentials:
accessKey: ${IAM_ACCESS_KEY}
secretKey: ${IAM_SECRET_KEY}
s3:
imageBucket: monthsub-image
# videoBucket: monthsub-video
domain: <https://monthsub-image.s3.ap-northeast-2.amazonaws.com>
region:
static: ap-northeast-2
stack:
auto: false
//씨큐리티
security:
jwt: //JWT 토큰 사용
header: authorization //헤더에 authorization 안에 토큰을 넣어줘야함.
issuer: monthsub // 작성자
client-secret: ${JWT_CLIENT_SECRET}
expiry-seconds: 86400 //1일
cors:
origin: // 허용 도메인
- <http://localhost:3000>
- <http://127.0.0.1:3000>
- <https://monthsub.netlify.app>
allows: // 허용 엔드포인트
get:
- /assets/**
- /h2-console/**
- /v3/api-docs/**
- /swagger-monthsub.html
- /swagger-ui/**
# endpoint
- /health
- /main
- /series
- /series/sort
- /series/{id}
- /series/search/title
- /series/search/nickname
- /users/{id}/other
post:
- /users/login
- /users/signup
// 로컬 로그는 INFO 레벨까지 찍힘
logging:
level:
com.prgrms: INFO