What is the diference between putting a property on application.yml or bootstrap.yml in spring boot?

xiaoxiao2021-02-27  354

bootstrap.yml is loaded before application.yml.

It is typically used for the following:

when using Spring Cloud Config Server, you should specify spring.application.name and spring.cloud.config.server.git.uri inside bootstrap.ymlsome encryption/decryption information

Technically, bootstrap.yml is loaded by a parent Spring ApplicationContext. That parent ApplicationContext is loaded before the one that uses application.yml.

https://stackoverflow.com/questions/32997352/what-is-the-diference-between-putting-a-property-on-application-yml-or-bootstrap

转载请注明原文地址: https://www.6miu.com/read-7702.html

最新回复(0)