From 0b29f8aed0bebf1dce080e85a00c3d9f838729ec Mon Sep 17 00:00:00 2001 From: yellowgg Date: Sat, 14 May 2022 22:59:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A1=A5=E5=85=85=E7=9B=B8=E5=85=B3=E6=B3=A8?= =?UTF-8?q?=E8=A7=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 补充相关注解 --- .../system-design/framework/spring/spring-common-annotations.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/system-design/framework/spring/spring-common-annotations.md b/docs/system-design/framework/spring/spring-common-annotations.md index f2d89274..e4ef13f4 100644 --- a/docs/system-design/framework/spring/spring-common-annotations.md +++ b/docs/system-design/framework/spring/spring-common-annotations.md @@ -61,7 +61,7 @@ public @interface SpringBootConfiguration { 根据 SpringBoot 官网,这三个注解的作用分别是: - `@EnableAutoConfiguration`:启用 SpringBoot 的自动配置机制 -- `@ComponentScan`: 扫描被`@Component` (`@Service`,`@Controller`)注解的 bean,注解默认会扫描该类所在的包下所有的类。 +- `@ComponentScan`: 扫描被`@Component` (`@Repository`,`@Service`,`@Controller`)注解的 bean,注解默认会扫描该类所在的包下所有的类。 - `@Configuration`:允许在 Spring 上下文中注册额外的 bean 或导入其他配置类 ### 2. Spring Bean 相关