背景
配置單例的集合bean,以供多個(gè)bean進(jìn)行印用...需要引入 util 命名空間
報(bào)錯(cuò):
cvc-complex-type.2.4.c: 通配符的匹配很全面, 但無法找到元素 'util:list' 的聲明命咐。
解決方法:
在配置文件中篡九,添加:
添加以后:
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:util="http://www.springframework.org/schema/util" //新增
xmlns:p="http://www.springframework.org/schema/p" // 新增
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.3.xsd"> // 新增