Dump Spring boot Configuration

前端 未结 3 519
别那么骄傲
别那么骄傲 2021-01-13 05:56

Our Ops guys want the Spring boot configuration (i.e. all properties) to be dumped to the log file when the app starts. I assume this can be done by injecting the properties

3条回答
  •  余生分开走
    2021-01-13 06:52

    If you use actuator , env endpoint will give you all the configuration properties set in ConfigurableEnvironment and configprops will give you the list of @ConfigurationProperties, but not in the log.

    Take a look at the source code for this env endpoint, may be it will give you an idea of how you could get all the properties you are interested in.

提交回复
热议问题