Summary of basic core interfaces in spring

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.