my:
datasource:
url: local.db.com
username: local_user
password: local_pw
etc:
max-connection: 1
timeout: 60s
options: LOCAL, CACHE
---
spring:
config:
activate:
on-profile: dev
my:
datasource:
url: dev.db.com
username: dev
password: dev
etc:
max-connection: 1
timeout: 60s
options: DEV, CACHE
---
spring:
config:
activate:
on-profile: prod
my:
datasource:
url: prod.db.com
username: prod
password: prod
etc:
max-connection: 50
timeout: 10s
options: PROD, CACHE
- 구분선의 --- 이다.
- 스페이스 2칸으로 구분을 한다.
spring:
config:
activate:
on-profile: dev
- 이런식으로 프로필 적용을 할 수 있다.
'개발이 좋아서 > Spring이 좋아서' 카테고리의 다른 글
Spring boot - 액츄에이터 (0) | 2025.01.07 |
---|---|
Spring boot - 프로필(@Profile) (0) | 2025.01.06 |
Spring boot - 외부 설정(Environment, @Value, @ConfigurationProperties) (1) | 2025.01.03 |
Springboot - 자동 구성(Auto Configuration), @Conditional (0) | 2025.01.03 |
Springboot - 핵심 기능 5가지 (0) | 2025.01.02 |