I’m upgrading an app to Spring Boot 2 and for some reason it no longer registers the property files as they were before. My project is setup into a series of modules:
<modules>
<module>service-api</module>
<module>resource</module>
<module>war</module>
<module>integration</module>
<module>tests</module>
<module>docs</module>
</modules>
Before upgrading to SB2 my property files were read without issue from the resource
module, which was laid out like this:
When I run the application using this method:
@EnableAsync
@EnableFeignClients
@SpringBootApplication
public class IgipDealingApplication extends SpringBootServletInitializer {
public static void main(String[] args) {
SpringApplication.run(IgipDealingApplication.class, args);
}
}
I get the error Could not resolve placeholder 'us.comCache.serviceUrl'
despite this property existing in the property file application-DEV.yml
.
I’m running the application with the dev
profile and this is reflected on the logs on startup with The following profiles are active: dev
but it doesn’t fix the issue.
I’ve tried moving the properties folder to the resource directory of the module that uses it and this doesn’t work. However, if I create an appplication.yml
in the root of that resource directory with the property it registers:
Am I missing anything?