Is Spring Boot MVC controller multithreaded?

后端 未结 3 1044
忘了有多久
忘了有多久 2020-12-15 12:33

I\'m new to Spring MVC and I didn\'t find anything about this in doc. Let\'s say I have a controller /accounts which accepts POST requests to create an account. Two requests

3条回答
  •  悲哀的现实
    2020-12-15 13:12

    Most servlets start a separate thread for each incoming request and Spring isnt an exception to that. You need to make sure that the shared beans are thread safe. Otherwise Spring takes care of the rest.

提交回复
热议问题