> For the complete documentation index, see [llms.txt](https://jack80342.gitbook.io/spring-boot/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://jack80342.gitbook.io/spring-boot/iii.-using-spring-boot/15.-configuration-classes/15.1.-importing-additional-configuration-classes.md).

# 15.1. 导入其他配置类

你不需要将所有的`@Configuration`放进一个单独的类，`@Import`注解可以用来导入其他配置类。另外，你也可以使用`@ComponentScan`注解自动收集所有Spring组件，包括`@Configuration`类。
