The head of the spring configuration file xmls

Source: Internet
Author: User

<Beansxmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"
XMLNS:AOP= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"Xmlns:tx= "Http://www.springframework.org/schema/tx"
Xmlns:context= "Http://www.springframework.org/schema/context"Xmlns:mvc= "Http://www.springframework.org/schema/mvc"
Xmlns:task= "Http://www.springframework.org/schema/task"xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans- 3.1.xsd Http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.1.xsd HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP http://www.springframework.org/schema/aop/spring-aop-3.1.xsd Http://www.springframework.org/schema/context http://www.springframework.org/schema/context/ Spring-context-3.1.xsd Http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/s Pring-mvc-3.1.xsd Http://www.springframework.org/schema/task Http://www.springframework.org/schema/task/spri Ng-task-3.1.xsd ">

One:

xmlns= "Http://www.springframework.org/schema/beans" xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"

This is a necessary part of each configuration file, which is the root of spring.

Declares the default namespace for the XML file, which represents the default namespace for all labels that do not use other namespaces.

Declare an XML SCHEMA instance and declare it to use the SchemaLocation property.

Two:

xmlns:aop= "HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/AOP"

This is the spring configuration file that requires the use of an AOP tag, declaring a namespace prefixed with AOP, and the URL used to indicate the namespace is not used by the parser to find information. Its only function is to give the namespace a unique name. When a namespace is defined in the start tag of an element, all child elements with the same prefix are associated with the same namespace. Then other things like context (for component tags), MVC (for MVC tags), TX (for transaction labels) all mean the same.

force the use of Cglib agents <  proxy-target-class= "true"/>

Three:

Xsi:schemalaction part: http://www.springframework.org/schema/beanshttp://www.springframework.org/schema/beans/ Spring-beans-3.1.xsd

is to specify the XSD specification file for the namespace configured above, so that you will be given the following specific configuration of the XSD specification files according to the corresponding hints, such as how each label is written, and some of the properties can be smart hints, in order to prevent errors in the configuration is not easy to troubleshoot, The configuration is also validated against the XSD specification when the service is started. However, it is necessary to configure the XSD specification file for the MVC, AOP, TX, and so on that you configure in the xmlns above.

The head of the spring configuration file xmls

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.