I know this question may seem naive, but I have confusion regarding the bean scope in the web application. I know that for each request a new stream is generated by the container in the same way in the case of the spring web application, a new stream is created for each request, why it is proposed to define my controller, the service as singleton, the volume of these beans should not be a prototype, because each request , i.e. the stream will have its own instance of the controller, a service to work with.
Please enlighten me.
source share