Summary of basic core interfaces in spring
Understanding these interfaces, and their implementation classes, provides a quick overview of spring, with specific usage references to other spring materials
1.BeanFactory the most basic and core interface
The important implementation classes are:
Xmlbeanfactory, and classes under the ApplicationContext interface
2.Resource interface for universal access to file resources
1) Classpathresource: Read Acquisition form "Classpath:ApplicationContext.xml"
2) Fileststemresource: Read Acquisition form "File:c:\spring\src\applicationcontext.xml"
3) Servletcontextresource: Read Acquisition form "Web-inf\applicationcontext.xml"
Resourceloader Class for loading resource
3.FactoryBean Factory Bean
It itself is defined in bean factory and is also the factory used to create the target bean
Spring has the following implementations:
1) Jndiobjectfactorybean: Get object through Jndi lookup
2) Localsessionfactorybean: For local assembly of Hibernate sessionfactory
3) Localsessionfactorybean: For local assembly JDO Persistencemanagerfactory
4) Proxyfactorybean: proxy for obtaining AOP
5) Transactionproxyfactorybean: Used to create transaction proxies for objects for simple and easy-to-use declarative transaction proxies
6) Rmiproxyfactorybean: Create a proxy for remote objects accessed through RMI
4.ApplicationContext strengthens the function of Beanfactory and supports the following functions
1) Internationalization support
2) resource access
3) Event Monitoring mechanism
Its important implementation classes are:
Filesystemxmlapplicationcontext,classpathxmlapplication,xmlwebapplicationcontext
Callback interface for 5.Bean life cycle
Beanfactorypostprocessor,initializingbean,disposablebean,beanfactoryaware,applicationcontextaware, Resourceloader,beanpostprocessor
6.MessageSource interface
Its implementation class has resourcebundlemessagesource,reloadableresourcebundlemessagesource. The latter is re-loaded after the property file is modified
Summary of basic core interfaces in spring