-
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
2.4.0.CR1 Generated Bean Injection not working as before #20755
Comments
@aloubyansky could it be also related to the bootstrap refactoring PR? |
I'll check, thanks for letting me know. |
Yes, it's a regression caused by my change. |
Thank you guys for looking into this so quickly! Is there some kind of work around for this or do you plan to fix it for the 2.4.0.Final release? |
It should be fixed in 2.4.0.Final. |
Indeed that works. I added a branch with an ugly workaround for anyone interested. Using my implementation is highly discouraged though, as it uses a Gradle anti-pattern (direct project reference in build script).
Still, it works for the time being. |
@lorenzjosten if you like you can test #20770 by building it locally. One thing that still won't work though (2.3.0.Final isn't different in this regard) is changing the mapper interface in dev mode. That's another story though. |
Thank you! I’ll give it a try later and will let you know if it works. 👍🏻 |
Thanks @lorenzjosten |
Describe the bug
I am working on a multi-module gradle project which uses MapStruct for @entity to DTO conversion. Mapper beans are injected into microservice modules from shared data library modules. After upgrading from quarkus 2.3.0.Final to 2.4.0.CR1 injecting mapper beans does not work anymore. Using Jandex does not solve the problem either.
Expected behavior
Injecting MapStruct mapper beans from one module into another should work for 2.4.0.RC1.
Actual behavior
Injecting MapStruct mapper beans from one module into another does not work for 2.4.0.RC1. The application crashes before starting the server in devMode:
How to Reproduce?
I added code which allows for reproduction of the error to my github repo. Run quarkusDev for gradle module microservice-2.4.0 in order to reproduce the error. Run quarkusDev for gradle module microservice-2.3.0 in order to get the expected behaviour.
Output of
uname -a
orver
Darwin 20.6.0 Darwin Kernel Version 20.6.0: Mon Aug 30 06:12:21 PDT 2021; root:xnu-7195.141.6~3/RELEASE_X86_64 x86_64
Output of
java -version
openjdk version "11.0.10" 2021-01-19 OpenJDK Runtime Environment GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06) OpenJDK 64-Bit Server VM GraalVM CE 21.0.0.2 (build 11.0.10+8-jvmci-21.0-b06, mixed mode, sharing)
GraalVM version (if different from Java)
No response
Quarkus version or git rev
2.4.0.CR1
Build tool (ie. output of
mvnw --version
orgradlew --version
)Gradle 7.2
Additional information
Canonical bean injection, i.e. creating an @ApplicationScoped bean in the data-libraries, still works.
The text was updated successfully, but these errors were encountered: