Björn Eickvonder opened SPR-16919 and commented

We use Spring 4.3.17.RELEASE and started using the EnableAsync annotation.

But just adding this to a single configuration class breaks our application. At the same time we include a ConversionServiceFactoryBean to enable mapping String values in configuration to Set\ in a bean. This works perfect, but once we add EnableAsync the ConversionServiceFactoryBean is created to late.

I traced the problem down to the following * The ProxyAsyncConfiguration defines a bean of type AsyncAnnotationBeanPostProcessor * The AbstractAsyncConfiguration uses Autowired to setConfigurers

/**
 * Collect any {@link AsyncConfigurer} beans through autowiring.
 */
@Autowired(required = false)
void setConfigurers(Collection<AsyncConfigurer> configurers) {
  ...
}

And this is somehow breaking the order how beans are instantiated, if I remove the Autowiring here it works again.


Affects: 4.3.17

Comment From: snicoll

Sorry this got overlooked. This has been fixed in the meantime, see #21559