My Spring boot application is started from the command line with the following parameters
--spring.profiles.active=dev
Two property files are located in the resource folder :
application.properties
application_dev.properties
In my application I have a Spring Component which reads from the property file using the following
@Value("${ch.admin.host}")
private String remoteHost;
The problem is that the value of the default property file (application.properties) is assigned to the variable remoteHost, and not the value of the property file application_dev.properties