我有一个 Grails 2.0.1 jQuery Mobile 应用程序,这是我第一次使用 Spring Security。我遵循了 Peter Ledbrook post 中的出色说明。 .
成功登录后,应用程序的使用和安全控制工作正常。但是,如果用户刷新浏览器,则会发生 AuthenticationServiceException。
登录后浏览器中显示的 URL 是我的应用程序的根目录加上/j_spring_security_check
http://localhost:8080/myapp/j_spring_security_check
为什么这会附加到我的网址上?如果我手动编辑 URL 并指向应用程序的根目录,则重新加载浏览器不会出现问题。
最佳答案
尝试设置 data-ajax='false'
来形成元素
<form id="loginForm" name='f' action="<c:url value='/j_spring_security_check' />"
method='POST' data-ajax="false">
关于grails - Grails jQuery Mobile 应用程序中的 Spring Security 刷新错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9403584/