SyntaxFix
Write A Post
Hire A Developer
Questions
ApplicationContext applicationContext = new ClassPathXmlApplicationContext("/spring-servlet.xml");
Then you can retrieve the bean:
MyClass myClass = (MyClass) context.getBean("myClass");
Reference: springbyexample.org