简体   繁体   English

登录后自定义语言环境重定向-Spring Security

[英]Custom locale redirect after login - Spring Security

I am writing a simple prototype Spring MVC 3.2 with Spring Security. 我正在用Spring Security写一个简单的原型Spring MVC 3.2。 My requirements specify that the urls must be of the following structure 我的要求指定网址必须具有以下结构

http://app-name/{locale}/signin
http://app-name/{locale}/logout
http://app-name/{locale}/account

I have implemented a Filter to set the locale as a request attribute and successfully managed to get everything working, except spring-security login process, where it does redirect to /account on successful login. 我已经实现了一个过滤器,将语言环境设置为请求属性,并成功地使一切正常运行,但spring-security登录过程除外,该过程在成功登录时会重定向到/ account。

I was wondering whether it is possible to define some kind of wrappers for these actions? 我想知道是否可以为这些动作定义某种包装器?

<security:intercept-url pattern="/signin" access="permitAll"/>
    <security:form-login login-page="/signin"
                         login-processing-url="/security_check"
                         username-parameter="username"
                         password-parameter="password"
                         authentication-failure-url="/signin"
                         default-target-url="/account"

    />

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM