实现了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. 数据结构(c语言版,严蔚敏)第2章线性表

    弟2章线性表

  2. 关于axios中post请求提交后变成get的问题

    这个问题归结于自己的不细心,如下图. 头疼了好久,才发现是自己多写了一个s,在此记录一下.

  3. git——修改已经提交并push后的commit注释

    把代码push到远程后,发现commit的注释居然多了几个错别字,不行,必须改了! 搜索了一些答案之后自己做了一个总结如下: ①修改倒数第次的commit 指令:$ git rebase -i HEA ...

  4. js 获取数组中的最大值和最小值

    var arr = [3,12,23,18,25,33,22,30,1] 方案一: 思想 首先对数组进行排序(小 >大),第一项为最小值,最后一项为最大值 var min; var max; a ...

  5. (16)centos7 日志文件

    常见日志文件 开机启动日志,只会记录本次信息 /var/log/boot.log 计划任务日志 /var/log/cron 开机内核检测信息 /var/log/dmesg 账号登录信息 /var/lo ...

  6. yang文件语法格式

    前言 NETCONF(Network Configuration Protocol),该协议的配置功能非常强大,同时兼顾监控和故障管理,安全验证和访问控制,得到业界的一致认可,被广泛用来配置网络 NE ...

  7. php5模块pdo、pdo_mysql、mysqli的添加

    一.环境LAMP都是源码安装,PHP安装的时候没有配置pdo_mysql和mysqli,pdo是php5默认带的.PHP5的源码都在,只需要把php5的模块功能扩展就可以了. php源码目录:/usr ...

  8. c#委托(Delegates)--基本概念及使用 转发

    在我这菜鸟理解上,委托就是可以用方法名调用另一方法的便捷方法,可以简化switch等语句的重复.最近做项目的时候恰好需要用到委托,便来复习及学习委托的使用.嗯...本人以前并没有用过,只是稍微知道而已 ...

  9. Codeforces451A-Game With Sticks-思维

    After winning gold and silver in IOI 2014, Akshat and Malvika want to have some fun. Now they are pl ...

  10. MySQL数据库(三)—— 表相关操作(二)之约束条件、关联关系、复制表

    表相关操作(二)之约束条件.关联关系.复制表 一.约束条件  1.何为约束 除了数据类型以外额外添加的约束 2.约束条件的作用 为了保证数据的合法性,完整性 3.主要的约束条件 NOT NULL # ...