If you define your service in the singleton area in the spring configuration, what happens if several users try to access it (i.e., as a dependency injected into your controller) at the same time? Should this cause any conflict? Or will the IoC container hold the later call until the first termination? If so, this should slow down performance in large applications, which doesnβt sound right for me. Can someone give me the correct answer?
BTW, as I recall, if it is not single, the IoC container will combine several instances based on the number of requests. Can anyone confirm this?
spring ioc-container
Brolinuk
source share