实现了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. Delphi 窗体函数GetWindowRect 取窗口矩形坐标

    GetWindowRect,用于取窗口矩形坐标.返回值类型:布尔型(LongBool).执行成功返回真(True),否则返回假(False);参数1类型:整数型(HWND),目标窗口的窗口句柄;参数2 ...

  2. 根据ID查询实体

    //查询实体 $scope.findOne=function(id){ $http.get('../brand/findOne.do?id='+id).success( function(respon ...

  3. 同源策略 - JSONP - CORS

    1.  Jquery 对象可以通过 .index() 进行取出自当前元素在父级元素中存放的索引: 2. 浏览器的同源策略 -- Ajax 在访问非本网站的时候,在数据返回的时候,会被浏览器拦截 - 后 ...

  4. 管理员技术(五): 配置文档的访问权限、 配置附加权限、绑定到LDAP验证服务、配置LDAP家目录漫游

    一.配置文档的访问权限 问题: 本例要求将文件 /etc/fstab 拷贝为 /var/tmp/fstab,并调整文件 /var/tmp/fstab的权限,满足以下要求: 1>  此文件的拥有者 ...

  5. renren-fast-vue-动态路由

    在renren-fast-vue项目中,左侧边栏的系统管理这一模块的路由采用的是动态路由的写法, 模块中的路由内容由后台动态生成,在前端开发阶段,采用的是mock模拟数据生成 先是在左侧边栏(view ...

  6. 二分法查找--Python

    二分查找算法,最常规的应用就是在一个有序数组中找特定的数.一般分为四步走: 1. 判定条件为low小于high,low=0, high=size-1 2. mid=(low+high) / 2 3. ...

  7. json path espressions的语法学习

    json path espressions的语法学习 $:跟对象\元素 @:当前对象\元素 ?():应用过滤器(脚本)表达式 如: { "store": {    "bo ...

  8. Junit用断言对控制台输出进行测试

    核心思路: 在测试前,将标准输出定向到ByteArrayOutputStream中去 用输出流文件断言内容 测试完成,将标准输出修改为console 具体操作示例 基本通用复制粘贴操作 public ...

  9. 20140610 PP中可以绘制表格;PPT组合之后再加效果

    PPT绘制表格(行人检测的cell和block) 动画:组合之后再加效果

  10. JavaScript中的面向对象编程,详解原型对象及prototype,constructor,proto,内含面向对象编程详细案例(烟花案例)

    面向对象编程:   面向:以什么为主,基于什么模式 对象:由键值对组成,可以用来描述事物,存储数据的一种数据格式 编程:使用代码解决需求   面向过程编程:         按照我们分析好的步骤,按步 ...