实现了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的类将无法切入声明式事物的更多相关文章

  1. Spring Security 学习记录

    一.核心拦截器详细说明 1.WebAsyncManagerIntegrationFilter 根据请求封装获取WebAsyncManager 从WebAsyncManager获取/注册Security ...

  2. [转]Spring Security学习总结一

    [总结-含源码]Spring Security学习总结一(补命名空间配置) Posted on 2008-08-20 10:25 tangtb 阅读(43111) 评论(27)  编辑  收藏 所属分 ...

  3. Spring security 学习 (自助者,天助之!)

    自己努力,何必要强颜欢笑的求助别人呢?  手心向下不求人! Spring security学习有进展哦: 哈哈! 1.页面都是动态生产的吧! 2.设置权限:  a:pom.xml配置jar包 b:cr ...

  4. SpringBoot + Spring Security 学习笔记(五)实现短信验证码+登录功能

    在 Spring Security 中基于表单的认证模式,默认就是密码帐号登录认证,那么对于短信验证码+登录的方式,Spring Security 没有现成的接口可以使用,所以需要自己的封装一个类似的 ...

  5. SpringBoot + Spring Security 学习笔记(三)实现图片验证码认证

    整体实现逻辑 前端在登录页面时,自动从后台获取最新的验证码图片 服务器接收获取生成验证码请求,生成验证码和对应的图片,图片响应回前端,验证码保存一份到服务器的 session 中 前端用户登录时携带当 ...

  6. Spring Boot学习记录(二)--thymeleaf模板 - CSDN博客

    ==他的博客应该不错,没有细看 Spring Boot学习记录(二)--thymeleaf模板 - CSDN博客 http://blog.csdn.net/u012706811/article/det ...

  7. [转]Spring Security学习总结二

    原文链接: http://www.blogjava.net/redhatlinux/archive/2008/08/20/223148.html http://www.blogjava.net/red ...

  8. 我的Spring Boot学习记录(二):Tomcat Server以及Spring MVC的上下文问题

    Spring Boot版本: 2.0.0.RELEASE 这里需要引入依赖 spring-boot-starter-web 这里有可能有个人的误解,请抱着怀疑态度看. 建议: 感觉自己也会被绕晕,所以 ...

  9. spring security 学习资料

    spring security 学习资料 网址 Spring Security 文档参考手册中文版 https://springcloud.cc/spring-security.html

随机推荐

  1. go构造函数

    go构造函数 结构体没有构造函数,你可以创建一个函数返回一个相应类型的实例代替(类似一个工厂): func NewSaiyan(name string, power int) *Saiyan { re ...

  2. sublime text3 nodejs控制台输出结果中文乱码

    在sublime text3安装完nodejs的插件后,运行console.log("你好"),发现控制台出现中文乱码,解决办法:Preferences-> Browser ...

  3. php开发面试题---Mysql常用命令行大全

    php开发面试题---Mysql常用命令行大全 一.总结 一句话总结: 常见关键词:create,use,drop,insert,update,select,where ,from.inner joi ...

  4. Mina(一)

    配置log4j注意事项: Log4J 1.2 users: slf4j-api.jar, slf4j-log4j12.jar, and Log4J 1.2.x slf4j-log4j*.jar要对应  ...

  5. 从pcap文件中分析出数据包

    import dpkt import struct import sys,os f=file(sys.argv[1],"rb") pcap=dpkt.pcap.Reader(f) ...

  6. Decision Tree、Random Forest、AdaBoost、GBDT

    原文地址:https://www.jianshu.com/p/d8ceeee66a6f Decision Tree 基本思想在于每次分裂节点时选取一个特征使得划分后得到的数据集尽可能纯. 划分标准 信 ...

  7. bootstrap Modal 模态框垂直居中

    解决 Modal 垂直居中的问题,上网找了好多博客,有好多说改源码的,这个并没有实践. 但发现另一种解决办法,可以实现,代码如下: function centerModals(){ $('.modal ...

  8. 前端(六)—— 伪类选择器:a标签的伪类、内容伪类、索引伪类、取反伪类

    a标签的伪类.内容伪类.索引伪类.取反伪类 一.a标签的四大伪类 :link:未访问状态 :hover:悬浮状态 :active:活跃状态 :visited:已访问状态 四大伪类也可用于其他标签 &l ...

  9. JS:面向对象(进阶篇)

    组合使用构造函数和原型模式 构造函数模式用于定义实例属性,而原型模式用于定义方法和共享属性.结果,每个实例都会有自己的一份实例属性的副本,但同时又共享这对方法的引用,最大限度的节省了内存. funct ...

  10. MySQL数据库 -- Navicat、pycharm连接数据库

    内容目录 1.Navicat使用 2.pycharm使用数据库 一.Navicat使用 #1. 测试+链接数据库 #2. 新建库 #3. 新建表,新增字段+类型+约束 #4. 设计表:外键 #5. 新 ...