I am new to spring and I am currently using ClassPathXmlApplicationContext
to getBean
inside the controller class. This is a small example application
I am building. But what I am trying to do is to move this
ClassPathXmlApplicationContext
to a new class and keep it static across application. So I can just call
the newclass to invoke the DAO inside constructor.
I tried a few things but I am getting NestedServletException
error all the time.
Please suggest me a way to write my new class for data connection which will remain in the same state across my application, i.e. I can just call inside each controller class and not create a DAO object in constructor each time.
Appreciate any help, suggestion.
thanks Walker