java – 从元素’global-method-security’开始发现无效内容

weixin_38089340 2019-09-12 11:16:59
在下面的代码我得到一个像这样的错误“cvc-complex-type.2.4.a:从元素’global-method-security’开始发现了无效的内容. ‘{“http://www.springframework.org/schema/beans”:import,“http://www.springframework.org/schema/ beans“:别名,”http://www.springframework.org/schema/beans“:bean,WC [## other:”http:// www.springframework.org/schema/beans“],”http://www.springframework.org/schema/beans“:beans}’是 预期.” 怎么修好呢? <?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:context="http://www.springframework.org/schema/context" xmlns:security="http://www.springframework.org/schema/security" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd"> <context:component-scan base-package="client.security"/> <global-method-security secured-annotations="enabled" /> </beans>
...全文
40 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
weixin_38096686 2019-09-12
  • 打赏
  • 举报
回复
更换 "<global-method-security secured-annotations="enabled" />" line with <security:global-method-security secured-annotations="enabled"/> 它应该工作..

433

社区成员

发帖
与我相关
我的任务
社区描述
其他技术讨论专区
其他 技术论坛(原bbs)
社区管理员
  • 其他技术讨论专区社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧