ContactUs

Please send your Questions & Answers or Feedback to "mohan@javabook.org"

CORE : How to inject application provided class like Dao & Service ?

We can inject using constructor/setter, most of the cases we use the setter approach.
1.Write Dao, Service and the Action classes.
Write the Dao reference(instance variable) in the Service class and write the Service reference(instance variable) in the Action class.
2.Configure the Dao bean , Service bean and inject Dao --> Service using the setter, configure the action bean and inject the Service --> Action using the Constructor approach.
Related Posts Plugin for WordPress, Blogger...
Flag Counter