---
title: "spring security 3 多页面登录 小秘密小运气"
author: "tonytony3"
date: "2011-10-25T19:51:17Z"
tags: ["spring security 3 多页面 登录"]
categories: ["行业应用"]
slug: "spring-security-3"
draft: false
lastmod: "2011-10-25T19:51:17Z"
id: 1214081
url: "https://tonytony3.iteye.com/blog/1214081"
---

首先 多谢这两篇文章的作者 一：http://www.iteye.com/topic/1113842 \[color=red]多页面登录\[/color] 二：http://blog.csdn.net/k10509806/article/details/6436987 \[color=red]filter测试\[/color] 如果跟着上面都不成功 实现多页面登录需求的话， 下面可能的好的哦！ 最近，好想搞 spring security 3 前后台 多页面登录，跟着他们来配 不起用！ 我的\[color=red] MyLoginUrlEntryPoint implements AuthenticationEntryPoint就是进不去commence方法\[/color]，，，观察后 ， 和我的运气 测试得到了最 秘密（是因为我在文档查不到，找不到）的 配置 首先，不用配entry-point-ref="loginUrlEntryPoint" 直接 第二：在 某个地方的区别 第三：在 两个登录页的区别 action="${pageContext.request.contextPath}/j\_spring\_security\_check"&gt; action="${pageContext.request.contextPath\[color=red]}/cms/\[/color]j\_spring\_security\_check"&gt; 最后：因为用了auto-config=\[color=red]"true" 所以，不能用 position\[/color]="FORM\_LOGIN\_FILTER" ref="adminLoginFilter"/&gt; 而是： 就是这四步的区别，与第一篇文章！ 其他代码几乎一样！ 如果你的helloworld运行起来就可以来配这个了！ 真的好奇怪啊！我的运气这么好！好，我要把我的运气分给大家分享这个小秘密！ 不知道这的原理，刚学了1个月吧， 我这里的运行完全 符合需求，两个页两个targetPage，错误直到本页，没权去ERRORpage