简体   繁体   中英

Concurrency usage in Spring

I am using the spring-mvc with hibernate using tomcat . I am new in this field. i have one query. Earlier i was working on core java , where i learned many concurrent data structures (java.util.concurrent). I can spawn threads to deligate task, and can create my won manager worker model. My question is , can i use those concurrent package to create new threads to delegate tasks, can i create my own manager-worker model. I read, that in spring, its not advisable to spawn new thread, so how to achieve concurrency?

You usually use stateless beans in Spring MVC, so concurrency shouldn't be an issue.

See here:

spring mvc declaring all beans singleton

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM