Spring notes(二) – Ioc container

IOC container, in spring framework is BeanFactory, contains the following functions:

  1. controls the lifecycle (creation, init, destroy)
  2. controls the scope (like singleton, prototype, request, session, applicationcontext, new in spring)
  3. maintains beans’ dependence

BeanFactory is the base of the other modules in springframework.
Collection type for bean’s property:

  1. list
  2. set
  3. map
  4. props

Lazy init for bean:  <bean id=”xxx” class=”xxx” lazy-init=”true”>
ApplicationContext: a more useful Ioc container which is BeanFactory’s subclass,  is much more suitable for programmers to choose in their Enterprise Applications.

including more functions than BeanFactory:

  1. MessageResource
  2. Resource loading
  3. Event-broadcasting
  4. Load more than one xml files at one time
By javafuns on March 9, 2008 at 20:27 · Views: 726 · Permalink · RSS
Categorized in: Java, Scripts · Tagged with: , , ,
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply


  • Highest Rated

  • My PicasaPhotos

    IMG_0616.JPG

    03a8082652b4bd048a82a13a.jpg

    IMG_0568.JPG

  • RSS My del.icio.us

  • My RSS