# 5.4 小结

* 可以使用 @ConfigurationProperties 注解 Spring bean，以支持从几个属性源之一注入值。
* 可以在命令行参数、环境变量、JVM 系统属性、属性文件或 YAML 文件等选项中设置配置属性。
* 配置属性可用于覆盖自动配置设置，包括指定数据源 URL 和日志级别的能力。
* Spring profile 文件可以与属性源一起使用，根据活动配置文件有条件地设置配置属性。


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://potoyang.gitbook.io/spring-in-action-v5/di-5-zhang-shi-yong-pei-zhi-shu-xing/5.4-xiao-jie.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
