-
Notifications
You must be signed in to change notification settings - Fork 522
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
Spring Retry Why not use @ Aspect annotation? #358
Comments
Sorry, the question is not clear. We probably indeed can do an Here is a respective documentation: https://docs.spring.io/spring-framework/reference/core/aop/ataspectj/advice.html Well, we probably can use a |
Firstly, thank you for your reply. Perhaps the question I asked was not expressed clearly, but you have already answered what I wanted, which is exactly my guess. At present, I have also discovered some areas that can be improved, such as:
The first input parameter must be a Throwable exception, and the return value of the method must be the same as the return value of @ Retryable. It must be in the same class as @ Retryable, and configuring multiple will only take effect on one, and so on
Finally, thank you very much for your reply. My problem has been resolved. |
Thank you for confirmation that we are on the same page with your original request. And here is some discussion about an async retry: #81 |
I really enjoyed communicating with you. Just now, I wrote a simple plan for asynchronous retry, which may not have much to offer. Design concept:
The code is as follows: `package com.example.myretry; import lombok.extern.slf4j.Slf4j; import javax.annotation.Resource; @component
} ` |
I think the original question was answered and everything else goes out of context already. Closing as |
Okay, thank you very much for your reply. This issue has been resolved and completed. |
What are the main reasons for not using @ Aspect? What I have found so far is that @ Aspect annotations can only perform some operations before and after method calls, and cannot achieve automatic retry functionality.
At present, I want to write a component myself and take these into account
Thank you!
The text was updated successfully, but these errors were encountered: