都有哪些 bean scope?

2018-07-03 16:44 更新
  • singleton: Return a single bean instance per Spring IoC container+

  • prototype: Return a new bean instance each time when requested

  • request: Return a single bean instance per HTTP request

  • session: Return a single bean instance per HTTP session

  • global-session: Return a single bean instance per global HTTP session

默認(rèn)的是 singleton

以上內(nèi)容是否對(duì)您有幫助:
在線筆記
App下載
App下載

掃描二維碼

下載編程獅App

公眾號(hào)
微信公眾號(hào)

編程獅公眾號(hào)