spring_reference/III. Using Spring Boot/16.1. Gradually replacing a...

6 lines
449 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

### 16.1. 逐步替换自动配置
自动配置是非侵占性的,任何时候你都可以定义自己的配置类来替换自动配置的特定部分。例如,如果你添加自己的`DataSource` bean默认的内嵌数据库支持将不被考虑。
如果需要找出当前应用了哪些自动配置及应用的原因,你可以使用`--debug`开关启动应用。这将会记录一个自动配置的报告并输出到控制台。