1
0
mirror of https://github.com/Snailclimb/JavaGuide synced 2025-06-16 18:10:13 +08:00

Update spring-common-annotations.md

官网注释:
Session: Scopes a single bean definition to the lifecycle of a HTTP Session. Only valid in the context of a web-aware Spring ApplicationContext.
来自:
https://docs.spring.io/spring-framework/docs/3.0.0.M3/reference/html/ch04s04.html
This commit is contained in:
东三环牛哥 2022-02-22 10:35:42 +08:00 committed by GitHub
parent 13b950686d
commit ffc79bba65
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`