通配符的匹配很全面,但无法找到元素‘util:list’

在使用xml时发现该类问题是由于头文件引用不全引起的,错误信息如下

错误信息所以解决起来也只要补全头文件就好了
解决方案:
注意补全xsi:schemaLocation文件引用

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:p="http://www.springframework.org/schema/p"
       xmlns:util="http://www.springframework.org/schema/util"

       xsi:schemaLocation="http://www.springframework.org/schema/beans
       http://www.springframework.org/schema/beans/spring-beans.xsd
       http://www.springframework.org/schema/util
       http://www.springframework.org/schema/util/spring-util-4.0.xsd">
发布了9 篇原创文章 · 获赞 0 · 访问量 124

猜你喜欢

转载自blog.csdn.net/Lchen_kk/article/details/103955567