I want to be able to use different application.properties in my MVC REST app. I've created application-.properties for each of my enironments. I only managed to get this to work by setting -Dmyapp.env= then adding
<context:property-placeholder location="classpath:application- ${myapp.env}.properties" />
I was looking at spring profiles and thought that I could have an application.properties and in that file set spring.profiles.active= and the specific application-.properties file would also be read and override any proeprties set in the application.properties.. but I could not get this to work and I notice that the docs mention that this work with spring boot..
Is there a way to get this to work with a web app(not spring boot)