2
我的bean配置文件如下定影HTTP标签
<?xml version="1.0" encoding="UTF-8"?>
<beans:beans xmlns="http://www.springframework.org/schema/mvc"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
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
">
</beans:beans>
我不能够添加以下到它,虽然我已经进口安全3.1.1罐子
<http>
<intercept-url pattern='/home*' access='ROLE_USER,ROLE_ADMIN' />
</http>
谢谢。但一个警告刚刚出现。无法找到元素安全性的Spring命名空间处理程序:http –
请解释:您在使用什么IDE?你正在编写一个servlet或你自己的可运行jar吗?请显示您用来运行所有内容的代码。 – Rajit
问题已经通过在每个子标签的开始处添加'security:'来解决:'security:logout' –