Search Posts

How to Get Spring Managed Service Instance Outside the Action Class in Struts2

Get link

Facebook

Twitter

Pinterest

Email

Other Apps

In Struts 2, we can configure Spring to inject service instanced using Dependency Injection into Action classes. But sometime we need these service class instances in other components who are are Spring aware. For example you need AccountsService instance in StudentService class. For such purpose I have createds util class which can return me reference to any service instance at run time, in any class.