First, it is possible that the answer is in the question. The Spring is a high-level of abstraction, eliminating in many cases the need for explicit threading events and asynchronous methods. Second, as already written there are many ways to synchronize threads, to give the correct answer, you must know your algorithm. Maybe you need CyclicBarrier, and maybe more efficient HashMap to replace BlockingQueue \_(ツ)_/
Larr answered on June 14th 19 at 20:09
Googly about the Object wait/notify, ConcurrentHashMap, and all that jazz. In General, Spring is definitely not for you if you such basic things still do not understand. Learn the basics first.