xvik / dropwizard-guicey

Dropwizard guice integration
http://xvik.github.io/dropwizard-guicey/
MIT License
230 stars 49 forks source link

Support Dropwizard 5.0 #376

Open lifey opened 5 months ago

lifey commented 5 months ago

Dropwizard 5.0 (bundling Jetty12) is in alpha release. https://central.sonatype.com/artifact/io.dropwizard/dropwizard-core/overview Currently dropwizard-guicey does not support it and fails to start java.lang.NoSuchMethodError: 'void io.dropwizard.jetty.MutableServletContextHandler.setAttribute(java.lang.String, java.lang.Object)' at ru.vyarus.dropwizard.guice.module.context.SharedConfigurationState.listen(SharedConfigurationState.java:258) at ru.vyarus.dropwizard.guice.module.context.ConfigurationContext.runPhaseStarted(ConfigurationContext.java:710) at ru.vyarus.dropwizard.guice.module.GuiceyRunner.(GuiceyRunner.java:43) at ru.vyarus.dropwizard.guice.GuiceBundle.run(GuiceBundle.java:133) at ru.vyarus.dropwizard.guice.GuiceBundle.run(GuiceBundle.java:101) at io.dropwizard.core.setup.Bootstrap.run(Bootstrap.java:199)

I have tried to compile it and there are several compilation issues relate to jakarta-ee decoupling from jetty

xvik commented 5 months ago

Thank you! I'll look.

lifey commented 5 months ago

Thanks @xvik if you need help with this LMK :)

xvik commented 5 months ago

Checked: everything is good. Just a few packages renamed (for example, org.eclipse.jetty.servlet.FilterHolder become org.eclipse.jetty.ee10.servlet.FilterHolder).

Plus, ServerPushFilterFactory was removed with related configuration (it was already deprecated).

There is a problem with admin-rest extension in case of async resources, but I doubt anyone use async admin rest at all. Will look closer later.

I did not push the changes (just shelved) because I don't want to maintain another branch right now. Will push it into master when at least beta would be released.

lifey commented 5 months ago

Thanks @xvik for the rapid response