I understand that spring loads the beans as singletons. But what would happen if spring is in a war. I ask this because war will have its own classloader.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
It would still delegate the class loading job to the webapp’s class loader and once the class is loaded, it would create a single object of that class and uses the same instance to inject everywhere it is referred to (provided the scope of this bean is singleton).