微服务中集成了swagger2
现在有两个服务 一个微信服务 一个会员服务 都注入了swagger
会员服务依赖于微信服务, 单独启动微信没有报错
启动会员服务时 爆出异常
Failed to start bean 'documentationPluginsBootstrapper'; nested exception is java.lang.IllegalStateException: Multiple Dockets with the same group name are not supported. The following duplicate groups were discovered. default

org.springframework.context.ApplicationContextException: Failed to start bean ‘documentationPluginsBootstrapper’; nested exception is java.lang.IllegalStateException: Multiple Dockets with the same group name are not supported. The following duplicate groups were discovered. default
Caused by: java.lang.IllegalStateException: Multiple Dockets with the same group name are not supported. The following duplicate groups were discovered. default
网上查了资料说是bean对象重复了. 这里发现是两个服务都注入了swagger 没有进行分组, 都配分配到默认的组里去了.
解决办法: 在swagger配置中进行分组
将注释放开即可.
1511

被折叠的 条评论
为什么被折叠?



