I can understand how @target
expression works, but I wonder why applying @target
has to be determined after loading Spring applications (after all beans are created).
In my thought, right after objects to be registered as a bean are created, when the Spring BeanPostProcessor is executed, it seems to be possible to check which annotations are attached to the object class and the classes in inheritance relationship (parents and children).
Therefore, I wonder why Spring tries to create proxies for all beans when using AspectJ Expression, when only @target
conditions are given and no other conditions are specified.
There seems to be a point where I am missing something, please point it out. Thank you and have a nice day.