Spring configuration file is fixed, here to SPRINGMVC configuration file For example, beans is the root tag, xmlns is name space abbreviation, General xmlns has beans, Xmlschema-instance,mvc,context
, TX. What tags are used in XML must be noted in xmlns. The following schemalocation address is the specification to which the above declaration is to be followed.
<?XML version= "1.0" encoding= "UTF-8"?><Beansxmlns= "Http://www.springframework.org/schema/beans"Xmlns:xsi= "Http://www.w3.org/2001/XMLSchema-instance"Xmlns:mvc= "Http://www.springframework.org/schema/mvc"Xmlns:context= "Http://www.springframework.org/schema/context"xsi:schemalocation= "Http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0 . xsd Http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd Http://www.springframework.org/schema/context Http://www.springframework.org/schema/context/spring-conte Xt-3.0.xsd "> <!--Adding annotated classes to the spring container - <Context:component-scanBase-package= "CN.ITCAST.JAVAEE.SPRINGMVC.APP15"/> </Beans>
Introduction to Spring Configuration files