To ease internal development I\'m thinking of developing a thin layer / customer starter for Spring Boot. This custom starter just depends on some boot starters and some oth
Spring Boot looks for properties using a specific order:
System.getProperties()
)java:comp/env
RandomValuePropertySource
that only has properties in random.*
application.properties
including YAML and profile variants)application.properties
including YAML and profile variants)@PropertySource
annotations on your @Configuration
classesSpringApplication.setDefaultProperties
)To give the projects using your custom starter the most flexibility in how to override the defaults, you should use a mechanism that's as near to the end of the above list as possible.
Given that you already have your own subclass of SpringApplication
, I would use SpringApplication.setDefaultProperties(Properties) from within that subclass.