인텔리제이에서 active profile을 설정하고 실행하면 다음과 같은 에러가 발생하는 경우가 있다.
아래의 에러는 profile을 dev로 설정하여 실행한 케이스이다.
Property 'spring.profiles.active' imported from location 'class path resource [application-dev.properties]' is invalid in a profile specific resource [origin: class path resource [application-dev.properties] - 1:24]
string.profiles.active 를 dev로 설정하고 실행한 경우로서 해결방법은 아주 간단하다.
application.properties에 다음의 옵션을 추가하면 된다.
나의 경우에는 dev모드를 따로 설정하고 있으므로 application-dev.properties에 추가하였다.
spring.config.use-legacy-processing=true
테스트 해보니 모드에 따라서 잘 실행된다.
'서버 > spring' 카테고리의 다른 글
mybatis 컬럼 누락 현상 (2) | 2023.10.05 |
---|---|
Unsupported major.minor version 52.0 에러 대응 (0) | 2020.12.15 |
댓글