它們的主要區別有以下幾點:
加載順序
bootstrap.yml(bootstrap.properties)在application.yml
之前加載。
用法
1.當我們使用 Spring Cloud Config Server時,相關配置項spring.application.name
和spring.cloud.config.server.git.uri
必須放在bootstrap.yml(bootstrap.properties)
2.使用加解密信息(encryption/decryption
)的時候。需要把信息放入bootstrap.yml(bootstrap.properties)。