dromara/myth

接收mq消息重试时,SpringCloudMythTransactionInterceptor 拦截器 异常

Opened this issue · 3 comments

mq消息监听时,重试方法时,会进入到AOP切面获取request;但实际上这个不是Feign调用,
无法获取request;
异常代码:
RequestAttributes requestAttributes = RequestContextHolder.currentRequestAttributes();
异常
java.lang.IllegalStateException: No thread-bound request found: Are you referring to request attributes outside of an actual web request, or processing a request outside of the originally receiving thread? If you are actually operating within a web request and still receive this message, your code is probably running outside of DispatcherServlet: In this case, use RequestContextListener or RequestContextFilter to expose the current request.

2.0.1 版本?

本地直接引用源代码项目
2.0.2-RELEASE

有解决方案吗?