Srping Boot version: 3.3.1

mmexport1725501383167.png

mmexport1725501384435.png

mmexport1725501385714.png

getBean can not get, through debug I found the hashcode is not the same,Why is it happen and how can I solve this problem?

Comment From: philwebb

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

I would suggest including a reproducer project so that folks can help you. Screenshots don't really provide enough information.

Comment From: tangllty

Thanks for getting in touch, but it feels like this is a question that would be better suited to Stack Overflow. As mentioned in the guidelines for contributing, we prefer to use GitHub issues only for bugs and enhancements. Feel free to update this issue with a link to the re-posted question (so that other people can find it) or add some more details if you feel this is a genuine bug.

I would suggest including a reproducer project so that folks can help you. Screenshots don't really provide enough information.

Hi, thanks for the reply, Stack Overflow doesn't seem to be able to log in, then I changed a couple of ways of writing it and finally found the solution by mistake with the help of GitHub Copilot. The type of the bean parameter I want to register is Class<T> I use Class.forName to register the instance and the above happens, but when I pass in the className directly, it works fine, is this a Spring feature? Why can I pass String for Class type?

SpringBoot No qualifving bean of type 'xxx' available SpringBoot No qualifving bean of type 'xxx' available

Comment From: philwebb

@tangllty I'm sorry, but we're unable to provide general Spring support in this issue tracker.