Attribute 'local' is not allowed to appear in element 'ref'.

配置:JDK:1.7spring:4.0.0

代码:

<ref local="user"/>

错误提示:

Attribute ‘local’ is not allowed to appear in element ‘ref’.

改正:
使用bean属性代替local

<ref bean="user"/>

原因:
spring4以后的版本不支持local属性

参考:Spring中提示元素 ‘ref’ 中不允许出现属性 ‘local’

发布了135 篇原创文章 · 获赞 5 · 访问量 7088

猜你喜欢

转载自blog.csdn.net/qq_27921205/article/details/104532185