java - 您需要在 Dropwizard 中提供 SwaggerBundleConfiguration 的实例
问题描述
我通过使用此模块https://github.com/smoketurner/dropwizard-swagger将 swagger 与 dropwizard 一起使用
我已按照所有相关步骤操作,当我运行应用程序时出现此错误
java.lang.IllegalStateException:需要提供 SwaggerBundleConfiguration 的实例
我在这里config.yml
遇到了类似的问题。并在文件中添加了以下几行
swagger:
resourcePackage: io.demo.backendservices.resources
但它仍然无法正常工作。请帮助
解决方案
可能是因为您没有在 Configuration 类中创建 SwaggerBundleConfiguration 实例吗?我已经使用 swagger 和所有其他东西创建了 dropwizard 项目示例,也许你可以检查一下,看看它是否对你有帮助。该项目在这里:
推荐阅读
- javascript - 类型错误:currentTodos.map 不是函数
- php - 作曲家试图分配所有 ram pc
- java - 当rest模板有使用Spring boot 1.5.x的拦截器时,我们可以使用@RestClientTest吗?
- c++ - 在控制台中打印出字符的问题
- c++ - Q_INVOKABLE const getter 返回 undefined,non-const getter 返回正确值 - 为什么?
- ios - 有没有办法从 Swift 字典中的查询中保存我的 firebase 模型?
- python-3.x - 填充缺失数字以创建完整序列的功能
- java - 班员从哪里来?
- c++ - C++ 错误“未定义对 'Student::Student 的引用
- c - 如何从C中的文件中获取结构