Good question. I think this is due to the way the Spring application boot context: it first creates all the raw beans, and then uses post-processors, for example. Add AOP (including transactions). For this layered architecture, you first need to create a normal bean and then wrap it. It can be argued that this approach follows composition over the principle of inheritance.
Also note that a) should not be a problem. The class should not perform initialization in the constructor, but in the @PostConstruct method, which is called only once. On the other hand, this leads to another problem:
c) constructor injection with CGLIB proxies cannot be used, see SPR-3150
But I understand your disappointment. Suppose the only acceptable solution to the problem is to weave AspectJ completely.
source share