If we add @Async fo the interface method, but don't provide an implementation for the interface, we and end up with issue, when @Async can't be applied and java.lang.IllegalArgumentException: Class must not be null is thrown.
Can't we use the same AutoProxyRegistrar technique for @Async as it is for @Transactional?
I mean build a new Proxy independently of target bean state.
I understand that AsyncExecutionAspectSupport should be the first one in the chain, but it looks like we have a limitation on the matter, if we don't provide a real implementation for our annotated interface.
The Spring Integration infrastructure just creates proxy fo the provided interface and that's all.
The root of the problem turned out to be in DefaultAdvisorChainFactory: getInterceptorsAndDynamicInterceptionAdvice receives a null targetClass in a scenario without a target instance, but then goes on passing into ClassFilters... which don't expect null. A simple fallback to method.getDeclaringClass() does the job there.