David J. M. Karlsen opened SPR-14097 and commented
Relates to #16761
When beans are instrumented with interceptors it doesn't resolve them properly.
E.g. this returns me 0 candidates:
ResolvableType resolvableType = ResolvableType.forClassWithGenerics( StgBusinessService.class, function.getClass() );
while this works
private <T extends Function> StgBusinessService<T> findBusinessService( T t ) {
Map<String,StgBusinessService> services = applicationContext.getBeansOfType( StgBusinessService.class );
ParameterizedType parameterizedType = TypeUtils.parameterize( StgBusinessService.class, function.getClass() );
return services
.values()
.stream()
.filter( service -> ArrayUtils.contains( AopUtils.getTargetClass( service ).getGenericInterfaces(), parameterizedType ) )
.findFirst()
.orElseThrow( () -> new IllegalStateException( "No handler for function type: " + function ) );
}
The 1st variant passes in my simple unit-test where there are no application of AOP, while it doesn't when loading the full-blown application which adds AOP.
Affects: 4.2.5
Issue Links:
Referenced from: commits f805427, 9a39a25, 3b7ca7e, edea66a
David J. M. Karlsen opened SPR-14097 and commented
Relates to #16761
When beans are instrumented with interceptors it doesn't resolve them properly.
E.g. this returns me 0 candidates:
while this works
The 1st variant passes in my simple unit-test where there are no application of AOP, while it doesn't when loading the full-blown application which adds AOP.
Affects: 4.2.5
Issue Links:
@Beanmethod with generic return type@BeanmethodsReferenced from: commits f805427, 9a39a25, 3b7ca7e, edea66a