spring boot 2.4 이후에 profile 설정

-·2023년 2월 18일
0

sts에서는 이런안내는 안나왔는데 집에서 작업할때는 요즘에는 Intellij로 사용한다

이유는... 그냥? 이것저것 쓰면서 하고싶어서 그냥 변덕이다

근데 profile 설정을 하는데 이런 안내가 뜬다.

화면 캡처 2023-02-18 163111

2.4이후에는 profile관련에서 변경점이 있는데

spring boot 2.4 이전

	...
---
spring:
    profiles: local
	...
---
spring:
    profiles: dev
	...
---
spring:
    profiles: prod
	...

spring boot 2.4 이후

	...
---
spring:
  config:
    activate:
      on-profile: local
	...
---
spring:
  config:
    activate:
      on-profile: dev
	...
---
spring:
  config:
    activate:
      on-profile: prod 
	...

sring.profiles는 "deprecated" 더 이상 안쓸꺼라고 한다

sring.profiles -> spring.config.activate.on-profile 변경되었습니다.

만약에 레거시로 하고 싶다면

spring:
 config:
   use-legacy-processing: true

해주면됨.

profile
거북이는 오늘도 걷는다

0개의 댓글