Spring aware interface and FactoryBean

2010-05-01  来源:本站原创  分类:Java  人气:209 

spring memorandum:
spring provides a lot of * aware interface is commonly used BeanFactoryAware, ApplicationContextAware, BeanNameAware
Bean achieve these interfaces are able to get the appropriate BeanFactory, ApplicationContext instance, to direct access to the container information.

FactoryBean interface to function is to package their own examples of custom logic (eg you want to use the factory pattern to instantiate, or Class.getInstance ()), and then let the spring unified management.

BeanPostProcessor, BeanFactoryPostProcessor interfaces are container extension points, allowing spring bean initialization or destruction at the time the callback, the callback can order to specify the order, provided that the need to implement Ordered Interfaces.

相关文章
  • Spring aware interface and FactoryBean 2010-05-01

    spring memorandum: spring provides a lot of * aware interface is commonly used BeanFactoryAware, ApplicationContextAware, BeanNameAware Bean achieve these interfaces are able to get the appropriate BeanFactory, ApplicationContext instance, to direct

  • spring remote interface to access and cluster programs (1) 2010-07-09

    Spring provides classes for integrating a variety of remote access technology. This kind of remote access support can reduce your support with POJO to achieve the development of remote access to business difficulties. Currently, Spring provides the f

  • spring remote interface to access and Cluster (2) 2010-07-09

    spring cluster program. In this article focuses on what cluster4spring open source framework spring clusters in the application and the actual demo example The first step, spring configured remote access interface, not described in this. The second s

  • Learning from the Spring BeanFactory interface to start - Bean scope 2010-07-11

    BeanFactory interface, a look at the three sub-interfaces: Is very clear ListableBeanFactory: to provide basic information to access the container bean method AutowireCapableBeanFactory: define the bean to the container in some way by the method of a

  • spring BeanFactoryPostProessor Interface 2011-04-29

    Bean definition file when the BeanFactory load all the content, but not formally created until Bean instance, BeanFactory need to deal with it, can BeanFactoryPostProessor interface postProcessBeanFactory ways to accomplish today, a few spring record

  • spring study 2010-03-29

    Recent studies have Spring, she includes programming ideas let me refreshing. So, this entry-level to write articles for the novice reference. I am not a Spring, a senior research staff, I am just now learning is currently sold. Therefore, the articl

  • Spring JSR-250 annotations -1 2010-03-29

    Reprinted from: http://www.infoq.com/cn/articles/spring-2.5-part-1 Note configuration relative to the XML configuration has many advantages: It can take full advantage of Java's reflection mechanism to obtain the class structure information, which ca

  • Spring Source Code Analysis (5): Spring AOP for Proxy 2008-09-28

    Let us look at some of Spring's AOP-related code is how to get Proxy, let us first take a look at AOP and Spring AOP with some basic concepts: Advice: Notices, set the connection point of what to do, in the Sping, he will describe Spring around the m

  • Source spring tour (1) _BeanFactory inheritance system and the ApplicationContext 2010-03-23

    BeanFactory and the ApplicationContext inheritance system Spring ioc container BeanFactory interface is the core interface, which provides access to bean and the bean from the container information on the most basic functions. BeanFactory interface d

  • chapter02 Spring's IoC 2010-04-07

    chapter02 Spring's IoC 1, IoC concept IoC, Inversion of Control, Inversion of Control. Collaborative relationship between objects from the objects themselves. Dependency injection: the object from the container to build collaborative relationships. S

  • Spring AOP study notes-Springle generation 2010-09-30

    Spring AOP generation Spring AOP as we discuss in detail the implementation details, we first give a simple example for the Spring AOP discussion off the ground: Let's write a simple output of "World" class, as follows: public class MessageWrite

  • struts2 + spring configuration issues 2010-11-18

    struts.xml: <! DOCTYPE struts PUBLIC "- / / Apache Software Foundation / / DTD Struts Configuration 2.0 / / EN" " http://struts.apache.org/dtds/struts-2.0.dtd "> <struts> <include file="struts-default.xml"/>

  • spring annotation (to) 2011-05-08

    spring annotation Keywords: spring Spring JSR-250 annotations Note configuration relative to the XML configuration has many advantages: It can take full advantage of Java's reflection mechanism to get the class structure information, which can reduce

  • Spring in Action Study Notes - Chapter IV conquest database (change) 2008-09-28

    Spring2.0 official version (http://www.springframework.org/download) Spring2.0 Chinese documents (http://spring.jactiongroup.net/viewtopic.php?t=2279&sid=0906ae6a913537b249e501db5b54c181). In the previous study, we have learned the core Spring framew

  • Spring Framework Analysis 2010-03-29

    The following uses top-down approach to system level design division: 1, Web tier This layer is mainly control interface page and the page jump, we use technology to WEB2.0 page specification, Jsp, and JSTL, page Jump SPRING control interface using t

  • Use Spring 2.5 annotation driven Spring MVC-based 2010-05-10

    http://www.uml.org.cn/j2ee/200907163.asp # N10059 This article includes: Outline A simple annotation-based Controller Listing 3. Annomvc-servlet.xml URL to a Controller handle multiple requests Listing 3. Each corresponding to a URL request handling

  • Spring 2.5 annotation based Spring MVC 2010-05-30

    A simple annotation-based Controller Low version of the Spring MVC to use the readers to know: When you create a Controller, we need to directly or indirectly, to achieve org.springframework.web.servlet.mvc.Controller interfaces. In general, we are t

  • [Reprinted] Spring 2.5 annotation-driven Spring MVC-based 2010-06-05

    Following an overview of Spring MVC Spring 2.0 On major upgrade, Spring 2.5 has introduced for the Spring MVC annotation-driven features. Now you do not need to Controller inherit any interface, no configuration file is defined in the XML request and

  • [WebService Tutorial] will be released Spring assembly JavaBean into WebService - 7 2010-07-04

    In today's Web applications frequently use the Spring framework to load the JavaBean. If it is to be certain in the Spring in the assembly of the JavaBean released into WebService, using Axis2's Spring perception function is very easy to do. In this

  • summarized a spring in jdbcTemplate 2010-09-07

    jdbcTemplate order In order to achieve the basic CRUD operations, spring offers us jdbcTemplate this template class. To achieve the most common CRUD operations. Look at the definition of jdbcTemplate public class JdbcTemplate extends JdbcAccessor imp