Friday, October 7, 2011

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

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

ViewManager viewManager;

1 comment:

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