-
Notifications
You must be signed in to change notification settings - Fork 2.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
No bean found in case of @LookupIfProperty + @Priority annotations #24961
Comments
@balladali How does the |
@mkouba injection point:
|
I think that it's caused by the fact that CDI type-safe resolution rules are applied first and the And this works as designed. Because @manovotn WDYT? |
+1, came to the same conclusion. Looking at expected behavior, it seems that if you just remove |
@manovotn If I remove
Looks like |
It doesn't, the priority is simply ignored. You'd need to either inject the |
Yes, the
Ah I misread your initial code, I can see If you had |
Is there some ability to get this ordered list of beans without |
Yes, but you'll need to use a UPDATE: I've sent #25061 to make the programmatic lookup easier. |
I'm going to close this one. Feel free to reopen if you want to discuss the problem further. |
Describe the bug
I have 2 configurations:
According to these configurations and property value I want to use different beans of type
Provider
. All three providers (ProviderOne
,ProviderTwo
andProviderThree
implement the same interfaceProvider
). I select the bean using the following code:But when property
type
istwo
, I get an exception (see Actual behavior).Expected behavior
AdditionalProviderConfiguration
doesn't exist and propertytype
isone
,ProviderOne
bean is selectedAdditionalProviderConfiguration
exists and propertytype
isone
,ProviderThree
bean is selectedAdditionalProviderConfiguration
exists andtype
istwo
,ProviderTwo
bean is selectedActual behavior
AdditionalProviderConfiguration
doesn't exist and propertytype
isone
,ProviderOne
bean is selected - As expectedAdditionalProviderConfiguration
exists and propertytype
isone
,ProviderThree
bean is selected - As expectedAdditionalProviderConfiguration
exists andtype
istwo
, the following exception:How to Reproduce?
No response
Output of
uname -a
orver
No response
Output of
java -version
"11.0.6" 2020-01-14 LTS
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.8.0.Final
Build tool (ie. output of
mvnw --version
orgradlew --version
)Maven 3.6.3
Additional information
No response
The text was updated successfully, but these errors were encountered: