Mischa Neumann opened SPR-14692 and commented
if you use @EnableAspectJAutoProxy and e.g. @EnableScheduling you might accidentally create a ScheduledMethodRunnable with an unproxied bean.
this is caused by AnnotationAwareAspectJAutoProxyCreator and ScheduledAnnotationBeanPostProcessor both having a default order of Ordered.LOWEST_PRECEDENCE.
as the developer usually has no insight in which post processor is applied in which order and the ordering might be critical for the application to function properly, I would suggest:
- log all post processors and their ordering at INFO level on startup
- force all post processors to have a unique order (there is enough space between Ordered.LOWEST_PRECEDENCE and HIGHEST_PRECEDENCE)
- review the existing spring framework post processors for having a reasonable default order
Affects: 4.2.7
Issue Links:
Referenced from: commits fd21e0e, edc62be
Mischa Neumann opened SPR-14692 and commented
if you use
@EnableAspectJAutoProxyand e.g.@EnableSchedulingyou might accidentally create aScheduledMethodRunnablewith an unproxied bean.this is caused by
AnnotationAwareAspectJAutoProxyCreatorandScheduledAnnotationBeanPostProcessorboth having a default order of Ordered.LOWEST_PRECEDENCE.as the developer usually has no insight in which post processor is applied in which order and the ordering might be critical for the application to function properly, I would suggest:
Affects: 4.2.7
Issue Links:
Referenced from: commits fd21e0e, edc62be