【问题标题】:How to resolve this failure to integrate Guice into Dropwizard?如何解决将 Guice 集成到 Dropwizard 的失败?
【发布时间】:2020-12-15 11:00:36
【问题描述】:

我尝试按照这种方法https://github.com/HubSpot/dropwizard-guicier 使用 dropwizard-guicier 将 Google Guice 引入我的 Dropwizard 2.0 项目,但出现错误

java.lang.IncompatibleClassChangeError: 
Class org.glassfish.jersey.message.internal.MessagingBinders$HeaderDelegateProviders does not implement the requested interface org.glassfish.hk2.utilities.Binder

dropwizard-guice https://github.com/HubSpot/dropwizard-guice 也会出现同样的错误

有人知道根本原因是什么以及如何解决吗?

【问题讨论】:

    标签: java guice dropwizard dropwizard-guice


    【解决方案1】:

    看起来上述两个库都已过时,还有另一个库 dropwizard-guicey https://github.com/xvik/dropwizard-guicey 适用于我的情况

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2015-03-16
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多