Overview of attributes in <beans> in Spring configuration file xml

Source: Internet
Author: User
Tags tag name

[HTML]View Plaincopy
  1. < beans &NBSP; xmlns = " Http://www.springframework.org/schema/beans " &NBSP;&NBSP;
  2.        xmlns:xsi = " http://www.w3.org/2001/XMLSchema-instance " &NBSP;&NBSP;
  3.        xsi:schemalocation =" HTTP://WWW.SPRINGFRAMEWORK.ORG/SCHEMA/BEANS&NBSP;&NBSP;
  4. Http://www.springframework.org/schema/beans/spring-beans.xsd ">


The root node of the Beans--xml file.


xmlns--is an abbreviation for XML namespace because the tag name of the XML file is custom-written and other people-defined tags are likely to be duplicated and functionally different, so add a namespace to differentiate the XML file from the other XML file , similar to the package in Java.

xmlns:xsi--refers to XML files adhering to the XML specification, xsi full name: XML Schema instance, refers to the specific use of the schema resource files defined by the elements of the specification. That is,/spring-beans-2.0.xsd the elements defined in this file adhere to what standards.

xsi:schemalocation--refers to the specification that XML elements in this document conform to, and the schemalocation attribute is used to reference (schema) schema documents, and the parser can use this document to validate XML instance documents when needed. Its value (URI) is in pairs, the first value represents the namespace, the second value represents the specific location of the schema document that describes the namespace, and two values are separated by a space.

Overview of attributes in <beans> in Spring configuration file xml

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.