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' –