If a bean has @Named annotation and the bean is injected as map then the name of the bean declared in @Named annotation is aways the key of the service in the map.
Actual Behaviour
If the bean annotated with @Named annotation is also injected by it's implementation type then and the injection happens before the map injection then the key in the map is the default name (lower-camel) instead of the name from @Named.
Expected Behavior
If a bean has
@Named
annotation and the bean is injected as map then the name of the bean declared in@Named
annotation is aways the key of the service in the map.Actual Behaviour
If the bean annotated with
@Named
annotation is also injected by it's implementation type then and the injection happens before the map injection then the key in the map is the default name (lower-camel) instead of the name from@Named
.Steps To Reproduce
please, see the attached project and the test
Environment Information
Java 21
Example Application
https://github.com/musketyr/micronaut-forgotten-compile-static
Version
4.5.0