I am using Spring MVC for my web application. My beans are written in \"spring-servlet.xml\" file
Now I have a class MyClass and i want to
Add this to your code
@Autowired
private ApplicationContext _applicationContext;
//Add below line in your calling method
MyClass class = (MyClass) _applicationContext.getBean("myClass");
// Or you can simply use this, put the below code in your controller data member declaration part.
@Autowired
private MyClass myClass;
This will simply inject myClass into your application