I'm trying to get the same Spring Boot application to open & run in the same in STS 4 (Eclipse) and Intellij. The set up is to have a properties file in main\resources with some default values and a 2nd properties file in project level config file with other properties 'simulating' an external properties file.
Currently both files are called application.properties and STS allows a right click run as a Spring Boot application with no problems. Presumably this is a pre loaded Spring plugin ?
I can't get this to work in Intellij. I've tried a number of configurations from named configurations to marking the config directory as a resources folder (Make IntelliJ aware of a properties file). Every way I've found in Intellij allows an either/or strategy where either file is valid but only on its own, it won't combine the 2 files into one set of properties.
Is there a plug in or technique that will allow me to use both files (without changing the actual code to add annotations etc) ?
so
MyApp - config\application.properties (extra properties not included in the jar) - main\resources\application.propeties (defaults)
To be clear I think I am trying to follow the correct order defined in the documentation ?
2.3. Application Property Files SpringApplication loads properties from application.properties files in the following locations and adds them to the Spring Environment:
A /config subdirectory of the current directory
The current directory
A classpath /config package
The classpath root