Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
baibuxiha opened this issue Apr 25, 2019 · 3 comments

Comments

@baibuxiha
Copy link

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.

@yu199195
Copy link
Member

2.0.1 版本?

@baibuxiha
Copy link
Author

baibuxiha commented Apr 25, 2019

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

@chenzhe
Copy link

chenzhe commented Jan 29, 2020

有解决方案吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants