• 安全框架配置文件(spring-security.xml)


    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:security="http://www.springframework.org/schema/security"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/security
        http://www.springframework.org/schema/security/spring-security.xsd">
        <!--对登录和失败页面放行-->
        <security:http pattern="/login.jsp" security="none"></security:http>
        <security:http pattern="/error.jsp" security="none"></security:http>
        <security:http pattern="/favicon.ico" security="none"></security:http>
        <security:http pattern="/css/**" security="none"></security:http>
        <security:http pattern="/img/**" security="none"></security:http>
        <security:http pattern="/plugins/**" security="none"></security:http>
    
        <security:http auto-config="true" use-expressions="false">
            <security:intercept-url pattern="/**" access="ROLE_USER"/>
    
            <!--页面的具体跳转-->
            <security:form-login login-page="/login.jsp"
                                 login-processing-url="/login"
                                 default-target-url="/index.jsp"
                ></security:form-login>
    
            <security:csrf disabled="true"/>
            <!--退出-->
            <security:logout invalidate-session="true" logout-url="/logout" logout-success-url="/login.jsp"/>
        </security:http>
        <!--配置默认可以登录的账户密码-->
        <security:authentication-manager>
            <security:authentication-provider>
                <security:user-service>
                    <security:user name="ding" password="{noop}ding" authorities="ROLE_USER" />
                </security:user-service>
            </security:authentication-provider>
        </security:authentication-manager>
    </beans>
    

      

  • 相关阅读:
    循环处理
    XMLHttpRequest 加载进度
    createjs 的 bitmapdata类
    console打印数组object具体内容
    html5 粒子组合成logo 的制作思路及方法
    createjs 更新
    css取消input、select默认样式(手机端)
    js获取url参数 兼容某些带#url
    Adobe Edge Animate CC 不再开发更新!
    《FLASH CC 2015 CANVAS 中文教程》——3、this关键字 入门
  • 原文地址:https://www.cnblogs.com/Hubert-dzl/p/11450927.html
Copyright © 2020-2023  润新知