Entries Tagged ‘AOP’:

Spring notes(四) - AOP

AOP in springframework…


Tags: , , - Views: 224 - Trackback -

Leave a Comment

Spring notes(三) - Resource

Resource interface defines the accessor to all various resources, such as file, http resource, ftp resource, class, etc.

Built-in implementations:

  1. UrlResource
  2. ClassPathResource
  3. FileSystemResource
  4. ServletContextResource
  5. InputStreamResource
  6. ByteArrayResource

Tags: , , - Views: 241 - Trackback -

Leave a Comment

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

Tags: , , , - Views: 250 - Trackback -

Leave a Comment

Spring notes(一) - Overview

Spring contains following modules:

springframework

  • Core: the core(beanfactory) of springframework providing bean management
  • Context: based on BeanFactory, but supports more functions, such as i18n, event-broadcasting, resource-loading, mail, validation, etc.
  • DAO: series of interfaces that you can choose to implement DAOs.
  • ORM: corresponding classes for integrating many ORM utilities to springframework.
  • Web/Web MVC
  • AOP: AOP function you can use to log or do transactions.

Tags: , , , - Views: 334 - Trackback -

Leave a Comment