2018/9/6 the Spring framework

Source: Internet
Author: User

Consolidation of Spring knowledge
AOP and IOC concepts, as well as understanding why the spring Framework is used for the purpose of transforming the direction of resource acquisition. More like it's on demand.
How to configure the Bean: Using XML, based on two kinds of annotation method.
1 by means of a full-class name reflection, 2 through a factory instance, 3 through a lower beanfactory way
There are two ways to rely on injecting di: attribute injection: Property and constructor injection: Constructor-args.
Injected details: Literal value can be injected through the tag of value, special characters! Method of [cdata[]]. To specify a reference to another bean by using the Ref method
can also be referenced by ${xxx}.
Cascading properties: That is, Cars.price modifies its value.
Collection properties: The list and map lists are labeled with a ref group, and map uses entry to configure its properties.
Take out the collection beans and separate them into a separate area? New namespaces util such as Util:list id= "Cars" the other is ref car.
There are also autowired byname Bytype, which can be more easily defined by the P-namespace.
Inheritance relationship between beans: parent= ""
Scope of the Bean: scope is set to Singleton and prototype.
Spel language is more dynamic to assign values.
Static factory methods and instance factory methods to configure the bean instance, and the relationship between the Factorybean configuration methods are not understood.
Use external properties file: Context:properties not understand. Remember.

2018/9/6 the Spring framework

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.