0

How can I create a Spring Boot starter to initialize properties automatically instead of adding them on the application.properties of the application?

For example, the configuration below would be done in the starter, not in the application:

server.port=8443
server.ssl.enabled=true

The common usage of starters is to create beans based on some condition. I just need the starter to define default properties and spring would create the beans.

The idea is to have a common set of properties to be used by many projects, just adding the starter as a dependency.

Eduardo Ito
  • 51
  • 2
  • 8
  • What is your use case? Starters usually define sets of beans to be loaded automatically by declaring dependency in maven/gradle on the autoconfiguration module. Is it done for tests or something? – Mark Bramnik Nov 21 '22 at 21:48
  • you can give them as Jvm values like `-Dproperty.key=value` – muhammed ozbilici Nov 21 '22 at 23:19

0 Answers0