Issue
Coming from Play Framework, a handy feature that has helped to organize the application configurations was to use include
s (Link) to spilt the various configurations into multiple .conf
files as below.
application.conf
Content
include "play-http.conf"
include "play-modules.conf"
include "play-i18n.conf"
include "authentication.conf"
include "hbase.conf"
include "custom-caches.conf"
include "custom-filters.conf"
#Any other root level application configurations
Is there an equivalent to this in Spring Boot .properties
files?
Solution
My requirement was simply achieved using the spring.config.import
(Link).
I created multiple property files such as hbase.properties
, custom-caches.properties
etc. And then in my application.properties
imported those additional property files as below.
spring.config.import=hbase.properties,custom-caches.properties
#Any other properties in the application.properties file
Thanks
Answered By - Bathiya Priyadarshana
Answer Checked By - Robin (JavaFixing Admin)