Skip to content

Commit 34abfa7

Browse files
authored
Merge pull request Snailclimb#1728 from yellowgg/patch-1
补充相关注解
2 parents c03001a + 0b29f8a commit 34abfa7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/system-design/framework/spring/spring-common-annotations.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public @interface SpringBootConfiguration {
6161
根据 SpringBoot 官网,这三个注解的作用分别是:
6262

6363
- `@EnableAutoConfiguration`:启用 SpringBoot 的自动配置机制
64-
- `@ComponentScan`: 扫描被`@Component` (`@Service`,`@Controller`)注解的 bean,注解默认会扫描该类所在的包下所有的类。
64+
- `@ComponentScan`: 扫描被`@Component` (`@Repository`,`@Service`,`@Controller`)注解的 bean,注解默认会扫描该类所在的包下所有的类。
6565
- `@Configuration`:允许在 Spring 上下文中注册额外的 bean 或导入其他配置类
6666

6767
### 2. Spring Bean 相关

0 commit comments

Comments
 (0)