org.springframework.security.access.AccessDeniedException: Access is denied
org.springframework.security.access.AccessDeniedException: Access is denied
at org.springframework.security.access.vote.AffirmativeBased.decide(AffirmativeBased.java:84)
at org.springframework.security.access.intercept.AbstractSecurityInterceptor.beforeInvocation(AbstractSecurityInterceptor.java:233)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:124)
at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:91)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.session.SessionManagementFilter.doFilter(SessionManagementFilter.java:137)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:111)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:170)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:158)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:200)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:116)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:64)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:56)
at org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:107)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:105)
at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:334)
at org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:215)
at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:178)
at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:357)
at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:270)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:310)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
2019-10-31 09:04:55,973 9803 [bio-9090-exec-2] DEBUG equest.HttpSessionRequestCache - DefaultSavedRequest added to Session: DefaultSavedRequest[http://localhost:9090/travel_web/login]
2019-10-31 09:04:55,973 9803 [bio-9090-exec-2] DEBUG ess.ExceptionTranslationFilter - Calling Authentication entry point.
2019-10-31 09:04:55,974 9804 [bio-9090-exec-2] DEBUG ty.web.DefaultRedirectStrategy - Redirecting to 'http://localhost:9090/travel_web/login.jsp'
2019-10-31 09:04:55,974 9804 [bio-9090-exec-2] DEBUG ssionSecurityContextRepository - SecurityContext is empty or contents are anonymous - context will not be stored in HttpSession.
2019-10-31 09:04:55,976 9806 [bio-9090-exec-2] DEBUG curityContextPersistenceFilter - SecurityContextHolder now cleared, as request processing completed
2019-10-31 09:04:55,980 9810 [bio-9090-exec-3] DEBUG .matcher.AntPathRequestMatcher - Checking match of request : '/login.jsp'; against '/login.jsp'
2019-10-31 09:04:55,981 9811 [bio-9090-exec-3] DEBUG .security.web.FilterChainProxy - /login.jsp has an empty filter list
解决方法:我在spring-security.xml设置的登陆路径是:
<security:form-login
login-page="/login.jsp"
...
/>
而我在页面访问的路径是:
<form action="${pageContext.request.contextPath}/login" method="post">
两个路径不一致,把路径改成一样的就行了。
org.springframework.security.access.AccessDeniedException: Access is denied的更多相关文章
- 学习黑马教学视频SSM整合中Security遇到的问题org.springframework.security.access.AccessDeniedException: Access is denied
问题已解决. 总结: 报错:org.springframework.security.access.AccessDeniedException: Access is denied 当您遇到同样问题时, ...
- Browser security standards via access control
A computing system is operable to contain a security module within an operating system. This securit ...
- [Yii2]Access to debugger is denied due to IP address restriction. The requesting IP address is
在更新到正式平台,看到runtime/app.log 有 Access to debugger is denied due to IP address restriction. The request ...
- oauth2中org.springframework.security.core.userdetails.User无法转换为封装的AuthorizationInfoBean
用springboot + oauth2 + redis搭建了一个项目,创建一个自定义的AuthorizationInfoBean继承org.springframework.security.core ...
- 使用asp.net MVC的 HtmlHelper 时遇到的小问题,报错:Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions.
异常信息:Templates can be used only with field access, property access, single-dimension array index, or ...
- Access教程 Access学习 Access培训 Access QQ交流集中地
Access教程 Access学习 Access培训 Access QQ交流集中地 http://www.office-cn.net/plugin.php?id=zstm_qqgroup:index ...
- access技巧 access源码 这里都可找到哦
这个网站不错,有很多access技巧 access源码 还有access公开课 access免费培训 access教程 大家要多看看哦: http://www.office-cn.net access ...
- 解决java.lang.SecurityException: Access to default session denied
原先使用的代码如下: Session session = Session.getDefaultInstance(properties, null); 后来把代码修改为: Session session ...
- Crystal Reports "Access to report file denied. Another program may be using it."
I encounter this problem several times, the way to get around this is to give "Everyone or Netw ...
随机推荐
- 【转】Apache的架构师们遵循的30条设计原则
本文作者叫Srinath,是一位科学家,软件架构师,也是一名在分布式系统上工作的程序员. 他是Apache Axis2项目的联合创始人,也是Apache Software基金会的成员. 他是WSO2流 ...
- C#表达式参数解析算法,N级属性调用,函数值,变量值,常量值
public static object GetValue(Expression expression) { var names = new Stack<string>(); var ex ...
- C#生成/调用动态链接库
参考地址:https://www.cnblogs.com/qq4004229/archive/2013/01/30/2882409.html 一.需求描述 (1)用代码生成动态链接库 (2)用C#代码 ...
- jquery.validate.unobtrusive的使用
应用 一.引入 <script src="Scripts/jquery-1.7.1.min.js"></script> <script src=&qu ...
- java基础小练习,1-打印一百次(1~10)的随机数,2-固定一个随机数(1~100),然后猜出他,3-定义以指定格式打印集合(ArrayList类型作为参数),使用{}括起来,使用@代替,分隔每个元素
推荐自己码一下,可以使用别的方法,面向对象,不需要注重过程 /* 题目:我需要打印一百次(1~10)的随机数 */ import java.util.Random; public class demo ...
- springboot maven项目转gradle的完整方法
1.maven转gradle的方法:在项目根目录下,使用命令行工具,输入如下内容: gradle init --type.pom 2.springboot项目的 build.gradle内容示例如下( ...
- nlp学习杂记
什么是 token embedding? 输入一个word,在字典里查找得到它对应的下标就是token,然后用该数字下标去lookup表查找得到该词对应的词向量(词嵌入)就是embedding wor ...
- Jenkins+Gitee异常解决
Failed to connect to repository : Command "git ls-remote -h username@mygit.com:cc/myproject.git ...
- 《SAP微顾问和大数据 》公众号管理课程清单
互联网商业模式创新 电子商务与传统企业转型 “一带一路”信息化:格局与对策 “一带一路”沿线国家主权信用及风险防范 大数据下的资源整合和知识共享 地产数字化改革的痛点与处方 携手共建“一带一路” 数字 ...
- spark存储模块之内存存储--MemeoryStore
MemeoryStore 上一节,我们对BlockManager的主要写入方法做了一个整理,知道了BlockMananger的主要写入逻辑,以及对于块信息的管理.但是,由于spark的整个存储模块是在 ...