A Quick Reference to the Spring 3 DI Bean Configuration





Spring 3 DI (dependency injection) functionality which placed in "Spring Core" is very important for managing objects (or "beans") in enterprise applications.


Here is a quick reference for bean configuration of Spring DI:

Spring Bean Configurations 





You can get a bean in application by

manual:
ApplicationContext context = new ClassPathApplicationContext(new String[] {“application-context.xml”})
ViewManager viewManager = (ViewManager)context.getBean(“viewManager”);

annotation:
@Autowired
ViewManager viewManager;




This entry was posted in ,,. Bookmark the permalink.

1 Response to A Quick Reference to the Spring 3 DI Bean Configuration

  1. Excellent pieces. Keep posting such kind of information on your blog. I really impressed by your blog.

Leave a Reply