application.yml和bootstrap.yml区别

2022-01-12 14:55:03 浏览数 (1)

application.yml在SpringBoot下生效 bootstrap.yml只在SpringCloud下生效,并且优先级bootstrap.yml > application.yml

要想在SpringBoot框架下生效的话可以引入springCloud的相关依赖

代码语言:javascript复制
<dependency>
    <groupId>org.springframework.cloud</groupId>
    <artifactId>spring-cloud-context</artifactId>
</dependency>

0 人点赞