Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit fe85a93

Browse files
Merge branch 'main' of github.com:Snailclimb/JavaGuide
2 parents c5aeba8 + c3b4e41 commit fe85a93

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎docs/system-design/framework/spring/spring-knowledge-and-questions-summary.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ Spring 中 Bean 的作用域通常有下面几种:
284284
- **prototype** : 每次获取都会创建一个新的 bean 实例。也就是说,连续 `getBean()` 两次,得到的是不同的 Bean 实例。
285285
- **request** (仅 Web 应用可用): 每一次 HTTP 请求都会产生一个新的 bean(请求 bean),该 bean 仅在当前 HTTP request 内有效。
286286
- **session** (仅 Web 应用可用) : 每一次来自新 session 的 HTTP 请求都会产生一个新的 bean(会话 bean),该 bean 仅在当前 HTTP session 内有效。
287-
- **application/global-session** (仅 Web 应用可用): 每个 Web 应用在启动时创建一个 Bean(应用 Bean),,该 bean 仅在当前应用启动时间内有效。
287+
- **application/global-session** (仅 Web 应用可用): 每个 Web 应用在启动时创建一个 Bean(应用 Bean),该 bean 仅在当前应用启动时间内有效。
288288
- **websocket** (仅 Web 应用可用):每一次 WebSocket 会话产生一个新的 bean。
289289

290290
**如何配置 bean 的作用域呢?**

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /