-
-
Notifications
You must be signed in to change notification settings - Fork 198
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
Guice @Inject doesn't create default constructor for MVC routes #3567
Comments
Hi The
This is preferred way. The Preferred:
Requires jooby processor to generate META-INF entry:
|
@tpoll which one inject annotation are you using? Is it |
I'm using @jknack I'm trying to avoid I have verified locally the the meta/INF file is being generated. |
you need to use jakarta(preferred) or javax. If you do that you will see that the generated router But yea you need to switch to jakarta |
ah, okay that makes sense. I didn't realize this would require switching to jakarta. verified locally that switching to jakarta does work. |
I can close this out then. I know it's a long shot, but is there any appetite for adding guice inject as a supported annotation for the default constructor? I can double up |
Can you rename the ticket? Should be simple to support due we actually have jakarta/javax (not sure who many people will find it useful) |
I'm attempting to upgrade to jooby 3.4.2.
currently, our jooby is set up with following guice-module docs to power the router generation. It's working fine for us on 3.0.5.
When updating, I consistently am getting
Router not found: **** . Make sure Jooby annotation processor is configured properly.
.I've tried to register the routers via the
mvc
method likeMyRouter.class
andMyRouter_.class
, but both give me the same error.Is there a new way to make DI injection for mvc work in the generated code world? It seems like the docs for guice haven't updated, so I assumed the old way would work without any changes.
The text was updated successfully, but these errors were encountered: