spring mvc supports default modifiers, @GlobalTransactional only support public modifiers.
Check Ahead
-
[x] I have searched the issues of this repository and believe that this is not a duplicate.
-
[ ] I am willing to try to implement this feature myself.
Why you need it?
@GlobalTransactional
@GetMapping("/")
Result index() {
// do something
return Result.success();
}
@GlobalTransactional not effective
How it could be?
No response
Other related information
No response
I'd like to work on this issue. My idea is to change GlobalTransactionalInterceptorParser.existsAnnotation, clazz.getMethods() to clazz.getDeclaredMethods() and filter out private methods (as proxies can't intercept them). This would allow detection of annotations on protected and package-private methods.
I'd like to work on this issue. My idea is to change GlobalTransactionalInterceptorParser.existsAnnotation, clazz.getMethods() to clazz.getDeclaredMethods() and filter out private methods (as proxies can't intercept them). This would allow detection of annotations on protected and package-private methods.
Whether this issue needs to be modified requires discussion among community members.