1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-08-14 05:21:42 +08:00

Merge pull request #1564 from macEngine/patch-1

Update spring-common-annotations.md
This commit is contained in:
Guide哥 2022-02-22 21:44:15 +08:00 committed by GitHub
commit 92736110d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -125,7 +125,7 @@ public Person personSingleton() {
- singleton : 唯一 bean 实例Spring 中的 bean 默认都是单例的。 - singleton : 唯一 bean 实例Spring 中的 bean 默认都是单例的。
- prototype : 每次请求都会创建一个新的 bean 实例。 - prototype : 每次请求都会创建一个新的 bean 实例。
- request : 每一次 HTTP 请求都会产生一个新的 bean该 bean 仅在当前 HTTP request 内有效。 - request : 每一次 HTTP 请求都会产生一个新的 bean该 bean 仅在当前 HTTP request 内有效。
- session : 每一次 HTTP 请求都会产生一个新的 bean该 bean 仅在当前 HTTP session 内有效。 - session : 每一个 HTTP Session 会产生一个新的 bean该 bean 仅在当前 HTTP session 内有效。
#### 2.5. `@Configuration` #### 2.5. `@Configuration`