1
votes

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

1
Should be application-dev.properties - Strelok

1 Answers

0
votes

you should change your file to application-dev.properties.