I have a spring boot jar and I have properties defined in app-test.yml kept at src/main/resources within the jar. If i have the db details also in this single file, everything works fine.
But If I move the few properties in external file and run as :
java -jar -Dspring.profiles.active=test boot.jar --spring.config.location=location to external file/app-external.yml
it loads the profile test(as per log) hence should pick property from app-test.yml but fails for property present inside it:
Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'test.abc' in value "${test.abc}"
test.abc is defined in app-test.yml