728x90
@Profile
> 특정 profile에서만 bean 을 등록하고 싶은 경우
> application 동작을 특정 profile에서 bean설정을 다르게 하고 싶은 경우 사용
* application.properties > spring.profiles.active에 설정해서 사용
spring.profiles.active=prd
* spring.profiles.include 를 통해 생성한 application-{profile}.properties 파일을 추가할 수 있음
spring.profiles.include=fullname
> 이후 application-fullname.properties 생성 후 정의
* application-{profile}.properties 파일이 우선순위가 더 높아서 application.properties를 오버라이딩함
728x90
'Spring Boot' 카테고리의 다른 글
Spring boot 통합 Test (0) | 2022.02.20 |
---|---|
Logging (0) | 2022.02.20 |
Properties 관리 (0) | 2022.02.14 |
Spring boot 외부 설정의 우선순위 (0) | 2022.02.05 |
Spring boot 외부 설정 (0) | 2022.02.05 |
댓글