spring security 簡單登陸(二)

一、質料準備

  因爲我這裏是在項目中一步步來研究spring security所以不可能從搭建項目講起了,我只說要用這個spring security框架需要導入哪些基礎的jar
- spring-security-core
- spring-security-web
- spring-security-config
- spring-security-taglibs
這些jar和我都放在我的雲盤裏面,可以放心下載 (http://pan.baidu.com/s/1i4j53zZ


二、在項目中的web.xml中配置spring security需要的過濾器

    <filter>  
        <filter-name>springSecurityFilterChain</filter-name>  
        <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>  
        <web:init-param>
           <web:param-name>contextConfigLocation</web:param-name>
           <web:param-value>classpath:/springmvc-security.xml</web:param-value>
        </web:init-param>
    </filter>  

三、新增springmvc-security.xml配置文件

發佈了37 篇原創文章 · 獲贊 0 · 訪問量 3萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章