SpringMVC开头注解的坑——通配符的匹配很全面, 但无法找到元素 'XXXXX' 的声明

<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:context="http://www.springframework.org/schema/context"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       **<--开始注意的地方-->**
       xsi:schemaLocation="http://www.springframework.org/schema/beans
										http://www.springframework.org/schema/beans/spring-beans.xsd
										http://www.springframework.org/schema/context
			  							http://www.springframework.org/schema/context/spring-context.xsd
			  							http://www.springframework.org/schema/mvc
			  							http://www.springframework.org/schema/mvc/spring-mvc.xsd">

这里的顺序不能错,先http://www.springframework.org/schema/XX,
再到http://www.springframework.org/schema/beans/XX.xsd
不然会出现通配符的匹配很全面, 但无法找到元素 ‘XXXXX’ 的声明


版权声明:本文为aaasss7788原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。