Hi,

i am getting this exception from spring after upgrading versions from 6.1.14 to 6.2.1

Caused by: org.springframework.beans.factory.BeanNotOfRequiredTypeException: Bean named 'CTIChild' is expected to be of type 'org.springframework.transaction.TransactionManager' but was actually of type 'org.springbug.txbug.CTIChild$$SpringCGLIB$$0'

i created an example project where the issue can be reproduced.

https://github.com/zesman21/springbug/tree/main

This commit intruduced this spring framework issue: https://github.com/spring-projects/spring-framework/issues/24291

can you please have a look at that issue and confirm that this is a real bug?

thanks

Comment From: quaff

You can fix it by using @Component("CTIChild") instead of @Component @Qualifier("CTIChild"), please refer to Javadoc of Qualifier.

This annotation may be used on a field or parameter as a qualifier for candidate beans when autowiring. It may also be used to annotate other custom annotations that can then in turn be used as qualifiers.

Comment From: zesman21

thx for the info

Comment From: quaff

I think it's a regression, fixed by https://github.com/spring-projects/spring-framework/pull/34191.