-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
@UnlessBuildProfile not working as expected #16243
Comments
CC @mkouba |
Actually, I wonder if this is not a combination of RESTEasy scanning and taking over discovery because CDI would not claim that bean? |
Yes, I think so. The bean is not registered but there's a fallback used in the QuarkusInjectorFactory that just creates the resource instance via |
TBH I'm not sure what the correct behavior would be but I think that the fallback is there since the beginning (and an "invisible" DEBUG message is logged). |
CC @geoand |
Yeah, I think what you guys mention is what is going on |
So perhaps RESTEasy Classic and Reactive should both special-case |
That will likely be needed |
This actually should be working as we have merged: #15215 So I'll need to have another look |
I am using |
OK, that explains it then, as I just tried with the latest and it works. So you need to use |
Describe the bug
When @UnlessBuildProfile used on @ApplicationScoped bean, there are a couple of issues I am seeing.
for example, I have @UnlessBuildProfile("prod"), and when building the prod I still see the bean available. I could verify that because in my case it is rest controller.
Expected behavior
The bean be not available
To Reproduce
build with
-Dquarkus.profile=prod
The text was updated successfully, but these errors were encountered: