Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Spring/Spring.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ IOC就是控制反转,通俗的说就是我们不用自己创建实例对象
我们一般使用 @Autowired 注解自动装配 bean,要想把类标识成可用于 @Autowired 注解自动装配的 bean 的类,采用以下注解可实现:

- @Component :通用的注解,可标注任意类为 Spring 组件。如果一个Bean不知道属于哪个层,可以使用@Component 注解标注。
8 @Repository : 对应持久层即 Dao 层,主要用于数据库相关操作。
- @Repository : 对应持久层即 Dao 层,主要用于数据库相关操作。
- @Service : 对应服务层,主要涉及一些复杂的逻辑,需要用到 Dao层。
- @Controller : 对应 Spring MVC 控制层,主要用户接受用户请求并调用 Service 层返回数据给前端页面。

Expand Down Expand Up @@ -253,4 +253,4 @@ Spring使用ThreadLocal解决线程安全问题。如果你的Bean有多种状

https://juejin.cn/post/6844903860658503693

https://www.cnblogs.com/jingmoxukong/p/9408037.html
https://www.cnblogs.com/jingmoxukong/p/9408037.html