How does the singleton Bean serve the concurrent request?

后端 未结 6 1849
情话喂你
情话喂你 2020-12-07 07:57

I have a question regarding how singleton beans serve concurrent requests in detail.

I have searched on StackOverflow regarding this question. This is a sample link

6条回答
  •  难免孤独
    2020-12-07 08:35

    Singleton is a bean scope. You have to handle that how to serve for multiple thread access. You can use synchronization or concurrent pakages. Ref: Are Spring singleton beans thread-safe?

    For concurrent request, single bean will serve for mutliple requests one by one.

提交回复
热议问题