I'm running spring in debug mode, and after struggling to get it to recognize an external properties file I finally got it to do so
Loaded config file 'file:C:/Users/udyj/git/hermes-mq-tool.lib/rte/application-ALD-INT.properties'
However right after that line
Skipped (empty) config file 'file:C:/Users/udyj/git/hermes-mq-tool.lib/rte/application-ALD-INT.properties'
The thing is though, it isn't empty
Name=ALD-INT
Queues=
QueueManager=whatever
TAS_MQS_PASSWORD=pw
TAS_MQS_USER=name
I'm running spring this way,
pb = new ProcessBuilder().inheritIO().command(java, "-noverify", "-cp", classpath,
String.format("-Dspring.config.location=%s", "C:\\Users\\udyj\\git\\hermes-mq-tool.lib\\rte\\application-ALD-INT.properties"),
clazz.getCanonicalName()
);
What does the empty config file thing mean?
In essence the Spring configuration files (that can have any name by the way, not just the generic applicationContext. xml ) are treated as classpath resources and filed under src/main/resources .
Spring Boot lets you externalize your configuration so that you can work with the same application code in different environments. You can use properties files, YAML files, environment variables, and command-line arguments to externalize configuration.
Using the Default Location By convention, Spring Boot looks for an externalized configuration file — application. properties or application. yml — in four predetermined locations in the following order of precedence: A /config subdirectory of the current directory.
This is an open issue
The misleading logging is an unfortunate side-effect of it being performed in a generic location that doesn't (and shouldn't) understand the difference between .properties and .yaml configuration files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With