-
-
Notifications
You must be signed in to change notification settings - Fork 951
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
Micronaut Primary bean not recognised as Primary in Grails 4 #11367
Comments
@jameskleeh : I upgraded the example project (erichelgeson/mnbeansPrimary@0a35af5) to Grails 4.0.1 (andersaaberg/mnbeansPrimary@3396fa6), but it still fails on startup with the error: |
@andersaaberg I have added tests for this in |
Expanded integrationtest to demonstrate that it is not possible to inject StatefulRedisConnection without @qualifier("io.lettuce.core.api.StatefulRedisConnection(Primary)")
@jameskleeh I have extended your test with injection of an actual StatefulRedisConnection bean: https://github.com/grails/grails3-functional-tests/pull/22 The test only passes when using the qualifier as workaround: Am I doing something wrong? |
@andersaaberg Hard to say. You can debug https://github.com/micronaut-projects/micronaut-spring/blob/a4f1bd7618ec4c8d1c298777adf881fa0ef65120/spring-context/src/main/java/io/micronaut/spring/context/factory/MicronautBeanFactory.java#L804 to see if the bean is getting correctly identified as primary |
Task List
Steps to Reproduce
Expected Behaviour
The bean marked as Primary should be used.
Actual Behaviour
Work around
Add qualifier
Environment Information
Example Application
The text was updated successfully, but these errors were encountered: