spring-cloud-starter-bootstrap依赖
时间: 2023-09-03 17:06:43 浏览: 217
spring-cloud-starter-bootstrap依赖是用于支持Spring Boot项目中的配置文件的。它可以帮助加载bootstrap.properties或bootstrap.yml配置文件。在SpringBoot 2.4.x版本之后,引入这个依赖是需要的。以下是两个示例依赖的引用内容:
1. 引用:
```xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>3.1.0</version>
</dependency>
```
2. 引用:
```xml
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bootstrap</artifactId>
<version>3.1.3</version>
</dependency>
```
通过引入spring-cloud-starter-bootstrap依赖,你可以使用bootstrap.properties或bootstrap.yml配置文件来配置你的Spring Boot项目。这个依赖对于使用Spring Cloud和Spring Boot的项目来说非常方便。<span class="em">1</span><span class="em">2</span><span class="em">3</span>
#### 引用[.reference_title]
- *1* [spring-cloud-starter-bootstrap依赖的含义](https://blog.csdn.net/weixin_45433031/article/details/125302701)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
- *2* *3* [SpringBoot支持bootstrap.yml/bootstrap.properties配置文件,需要导入spring-cloud-starter-bootstrap依赖](https://blog.csdn.net/hkl_Forever/article/details/129352372)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"]
[ .reference_list ]
阅读全文