它们的主要区别有以下几点:
加载顺序
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)。