Is there any way in Spring to load a bean specifically.
I’ve a appContext file having lots of beans.
When loading it using the following code, it loads all beans again.
BeanFactory factory = new ClassPathXmlApplicationContext("appContext.xml");
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.
What about using
ApplicationContextAware?Bean mapping
<bean id="springApplicationContext" class="SpringApplicationContext"/>Java implementation
Then use it like this;
SpringApplicationContext.getBean("myBean");