|
|
|
|
|
by darthbanane
1098 days ago
|
|
Some of the aspect oriented stuff like cacheable will add a proxy to the annotated bean which can break reasoning about the code. If you inject the bean and call the method you will get caching (because you are using the proxy). If you call the method from within the bean itself however you're not using the proxy and you won't get caching. It's stuff like this on steroids when you start mixing annotations that makes it really difficult to reason about the code. |
|
*I would do it by introducing a new annotation:
Compiler can trigger a warning when a method invokes another method of the same class which is annotated with annotation marked as implemented by proxy.Maybe Sonar or similar tool already does this kind of analysis.