-
Notifications
You must be signed in to change notification settings - Fork 40.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autowiring by name not working in 3.2.0? #38536
Comments
It sounds like this is linked with the removal of the Can you compile your project with If this doesn't work, could you please create a minimal project that reproduces the problem and share it as a git repository or attached as a zip here? Thanks! |
Had the same issue. Adding the |
Hi @bclozel , |
Thanks for letting us know @anogueiraFlywire ! |
Here is a little example project where it does not work. --parameters are in place. Does not work in IDE as well. With spring-boot 3.1.4 it works fine. |
@anydoby, your app's using an old version of Maven's compiler plugin. The problem does not occur if you use the latest version, 3.11.0.
With Spring Boot 3.1.4, you see this warning:
This warning when using Spring Boot 3.1.x is also addressed by upgrading the version of Maven's compiler plugin. |
Thank you @wilkinsona. This indeed worked for the simple example. Unfortunately it did not for a real-life one which I have issues with. I'll continue investigating what is causing it. |
It also very important that you run a |
We noticed this issue going from spring-boot 3.1.X to 3.2.2 and resolved it by updating the maven-compiler-plugin to version 3.12.1 |
As suggested in the error message
adding compileJava {
options.compilerArgs.add("-parameters")
} |
Hello team,
We've tried upgrading to version 3.2.0 of Spring Boot and we came across what we think might be a bug.
With this new version, Autowiring by name doesn't seen to be working, and it's forcing us to include a @qualifier(name) tag whenever we have multiple beans of the same type. Is this behaviour intended and we missed it from the docs?
Example:
We have multiple Queue and TopicExchange defined with different names, like
And we used to inject it with:
Is now forcing us to include @PathVariable("id")
The text was updated successfully, but these errors were encountered: