Spring-Security (学习记录七)--实现FilterInvocationSecurityMetadataSource的类将无法切入声明式事物
实现了FilterInvocationSecurityMetadataSource 的类将无法切入声明式事物。
原因:
1 查看继承关系
先查看FilterInvocationSecurityMetadataSource的继承结构,可以看出,这个类是AopInfrastructureBean的子接口

2 说明
可以看出FilterInvocationSecurityMetadataSource 是SecurityMetadataSource的子类,这个SecurityMetadataSource类的源码中可以看出是继承AopInfrastructureBean接口的,在spring中 AopInfrastructureBean接口为一个标记接口,该接口有以下描述:
Marker interface that indicates a bean that is part of Spring's AOP infrastructure. In
particular, this implies that any such bean is not subject to auto-proxying, even if a
pointcut would match. 这里说明了该接口 不支持自动代理,即时他是一个匹配的接入点,也无法切入事物。
3 查看源码:
/**
* Marker interface for <code>SecurityMetadataSource</code> implementations
* that are designed to perform lookups keyed on {@link FilterInvocation}s.
*
* @author Ben Alex
*/
public interface FilterInvocationSecurityMetadataSource extends SecurityMetadataSource {}
/**
* Implemented by classes that store and can identify the {@link ConfigAttribute}s that applies to a given secure object
* invocation.
*
* @author Ben Alex
*/
public interface SecurityMetadataSource extends AopInfrastructureBean { }
/**
* Marker interface that indicates a bean that is part of Spring's
* AOP infrastructure. In particular, this implies that any such bean
* is not subject to auto-proxying, even if a pointcut would match.
*
* @author Juergen Hoeller
* @since 2.0.3
* @see org.springframework.aop.framework.autoproxy.AbstractAutoProxyCreator
* @see org.springframework.aop.scope.ScopedProxyFactoryBean
*/
public interface AopInfrastructureBean {
}
Spring-Security (学习记录七)--实现FilterInvocationSecurityMetadataSource的类将无法切入声明式事物的更多相关文章
- Spring Security 学习记录
一.核心拦截器详细说明 1.WebAsyncManagerIntegrationFilter 根据请求封装获取WebAsyncManager 从WebAsyncManager获取/注册Security ...
- [转]Spring Security学习总结一
[总结-含源码]Spring Security学习总结一(补命名空间配置) Posted on 2008-08-20 10:25 tangtb 阅读(43111) 评论(27) 编辑 收藏 所属分 ...
- Spring security 学习 (自助者,天助之!)
自己努力,何必要强颜欢笑的求助别人呢? 手心向下不求人! Spring security学习有进展哦: 哈哈! 1.页面都是动态生产的吧! 2.设置权限: a:pom.xml配置jar包 b:cr ...
- SpringBoot + Spring Security 学习笔记(五)实现短信验证码+登录功能
在 Spring Security 中基于表单的认证模式,默认就是密码帐号登录认证,那么对于短信验证码+登录的方式,Spring Security 没有现成的接口可以使用,所以需要自己的封装一个类似的 ...
- SpringBoot + Spring Security 学习笔记(三)实现图片验证码认证
整体实现逻辑 前端在登录页面时,自动从后台获取最新的验证码图片 服务器接收获取生成验证码请求,生成验证码和对应的图片,图片响应回前端,验证码保存一份到服务器的 session 中 前端用户登录时携带当 ...
- Spring Boot学习记录(二)--thymeleaf模板 - CSDN博客
==他的博客应该不错,没有细看 Spring Boot学习记录(二)--thymeleaf模板 - CSDN博客 http://blog.csdn.net/u012706811/article/det ...
- [转]Spring Security学习总结二
原文链接: http://www.blogjava.net/redhatlinux/archive/2008/08/20/223148.html http://www.blogjava.net/red ...
- 我的Spring Boot学习记录(二):Tomcat Server以及Spring MVC的上下文问题
Spring Boot版本: 2.0.0.RELEASE 这里需要引入依赖 spring-boot-starter-web 这里有可能有个人的误解,请抱着怀疑态度看. 建议: 感觉自己也会被绕晕,所以 ...
- spring security 学习资料
spring security 学习资料 网址 Spring Security 文档参考手册中文版 https://springcloud.cc/spring-security.html
随机推荐
- 深入理解MAGENTO – 第八章 – 深入MAGENTO的系统配置
(以下是原文) Last time we talked about Magento’s System Configuration system. If you missed it, you’ll wa ...
- Less 和 Sass
LESS SASS sass 与 less 的区别与学习 : https://www.cnblogs.com/roashley/p/7731865.html 或 https://www.c ...
- mysql注入篇
博客这个东西真的很考验耐心,每写一篇笔记,都是在艰难的决定中施行的,毕竟谁都有懒惰的一面,就像这个,mysql注入篇,拖拖拖一直拖到现在才开始总结,因为这个实在是太多太杂了,细细的总结一篇太烧脑. 由 ...
- [NOIP模拟13]题解
A.矩阵游戏 其实挺水的? 考场上根本没有管出题人的疯狂暗示(诶这出题人有毛病吧这么简单的东西写一大堆柿子),而且推公式能力近乎没有,所以死掉了. 很显然乘法有交换率结合率所以操作顺序对最终结果没什么 ...
- [bzoj2752]高速公路 题解(线段树)
2752: [HAOI2012]高速公路(road) Time Limit: 20 Sec Memory Limit: 128 MBSubmit: 2102 Solved: 887[Submit] ...
- CentOS7用rpmforge源!
确认系统是否安装了priority这个yum的插件,这个插件用来保证安装软件时候软件仓库先后次序,一般是默认先从官方base或者镜像安装,然后从社区用户contribute的软件中安装,再从第三方软件 ...
- 13、java获取路径
1.获取WEB-INF文件夹下的文件 /C:/Users/Administrator/Workspaces/MyEclipse%2010/day_38_spring_hibernate/WebRoot ...
- 截取url中的某个字符串后面的值
获取到当前网址 var url = window.location.href; http://localhost:8080/exam_questions?type=3 //获取url中的参数 func ...
- jsp2自定义标签开篇
在JSP2中开发标签库需要以下几个步骤: 1.开发自定义标签处理类: 2.建立一个*.tld文件,每个*.tld文件对应一个标签库,每个标签库可包含多个标签: 3.在JSP文件中使用自定义标签. 第一 ...
- cesium中divPoint展示数据
cesium中divPoint展示数据 在用点击面获取位置信息的时候,会弹出一个divPoint框,用来展示这个面的属性信息:或者位置信息. 代码如下: var handlerClick = new ...