I am using Intellj to run my Spring Boot application which has application.yml file with place holder. The values of placeholder should be injected at run time depending upon the environment configuration.
server: port: ${SERVER_PORT} I am trying to run the Spring Boot application from Intellij by passing the place holder value in the Environment Variable section of application run
I am getting below error while running this application:
Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'SERVER_PORT' in value "${SERVER_PORT}" Caused by: java.lang.IllegalArgumentException: Could not resolve placeholder 'SERVER_PORT' in value "${SERVER_PORT}"