Spring AOP报错Set ‘exposeProxy‘ property on Advised to ‘true‘ to make it available问题
使用AopContext.currentProxy()时报错了.如下
Cannot find current proxy: Set 'exposeProxy' property on Advised to 'true' to make it available,and ensure that AopContext.currentProxy() is invoked in the same thread as the AOP invocation context.
看意思就是 没用设置 exposeProxy = true 这个参数.
解决:
@EnableAspectJAutoProxy(exposeProxy = true,proxyTargetClass = true)
更多详情可以参考
https://blog.csdn.net/mameng1988/article/details/85548812
https://blog.csdn.net/rtuujnncc/article/details/68926465
https://blog.csdn.net/z69183787/article/details/45622821/
https://blog.csdn.net/daofengsuoxiang/article/details/103027280
等等
另,通过this调用方法时,事务的失效也是因为这个原因.this调用拿到的并不是代理类,所以失效了.
Spring AOP报错Set ‘exposeProxy‘ property on Advised to ‘true‘ to make it available问题相关推荐
- Spring aop报错:com.sun.proxy.$Proxyxxx cannot be cast to yyy
在使用Spring AOP时,遇到如下的错误: Exception in thread "main" java.lang.ClassCastException: com.sun.p ...
- Spring AOP 报错 Exception encountered during context initialization - cancelling refresh attempt[已解决]
三月 19, 2018 4:01:40 下午 org.springframework.context.support.AbstractApplicationContext prepareRefresh ...
- vue 报错 Cannot read property ‘__ob__‘ of undefined的解决方法
vue 报错 Cannot read property '__ob__' of undefined的解决方法 参考文章: (1)vue 报错 Cannot read property '__ob__' ...
- 解决Spring Boot报错Mapped Statements collection already contains value for...Error while adding the mapp
解决Spring Boot报错Mapped Statements collection already contains value for...Error while adding the mapp ...
- 事件监听一直报错Cannot set property 'display' of undefined
为什么80%的码农都做不了架构师?>>> css ↓ .wechatBtn {position: relative;} .wechat {position: absolute; ...
- DateTimePicker 日期时间选择器报错 Cannot read property ‘getHours‘ of undefined, 无法选中`[__ob_: observer__]`时做判断
我在一次开发中遇到了这个情况:使用DateTimePicker 日期时间选择器,出现无法选中, 报错 Cannot read property 'getHours' of undefined, 这个原 ...
- Vue开启Gzip打包异常:webpack打包报错Cannot read property ‘emit‘ of undefined
Vue开启Gzip打包异常:webpack打包报错Cannot read property 'emit' of undefined 相关代码 const CompressionPlugin = req ...
- Spring data报错:Inferred type 'S' for type parameter 'S' is not within its bound;
Spring data报错:Inferred type 'S' for type parameter 'S' is not within its bound; 参照 org.springframewo ...
- Spring Boot 报错ThreadPoolTaskExecutor : Shutting down ExecutorService ‘applicationTaskExecutor‘
问题 Spring Boot 报错ThreadPoolTaskExecutor : Shutting down ExecutorService 'applicationTaskExecutor' 原因 ...
- 启动Spring项目报错,Springboot启动报错 Disconnected from the target VM 解决过程
启动Spring项目报错,Springboot启动报错 Disconnected from the target VM 解决过程 大概率是缺少了一下依赖 <dependency><g ...
最新文章
- C# Redis实战(六)
- Python解决ModuleNotFoundError: No module named ‘Queue‘的问题
- Python3爬虫-01-简单网页爬取
- Qt学习笔记之MySQL数据库
- 如何通过离线安装的方式让sublime text具有TypeScript语法高亮的功能
- Vue2.0用户权限控制解决方案
- 对话DDM:分布式数据库中间件全解析
- QCC3005 实现iphone手机banner显示电量图标【续】
- 低成本,高效率,更成熟的实时数据采集方案来了
- Excel 2010 VBA 入门 126 批量设置控件属性
- 微信小程序中集成有赞UI自定义Tabbar组件
- Cell Stem Cell | 动物所刘光慧等显示年轻血液可逆转衰老进程
- JVM之jstat命令
- juniper SSG防火墙与飞塔防火墙配置点到点IPSEC ***
- public,static,private,protected的用法
- Bugku MISC 粉色的猫
- windows7 系统搭建webdav服务
- 原型图、交互设计、UI图,到底啥关系
- 华为ws832虚拟服务器,玩的就是真实力!华为路由WS832实测体验
- XPS 13 9360 升级SSD, 迁移WIN10系统, 以及Acronis使用和Win10PE系统安装流水