提问务必按以下模板,提交详细信息。
错误信息多多益善、错误截图多多益善。
pigx版本: 4.0.0
是否修改包名: 是
新加了一个服务wfs,原先使用的是普通的swagger组件springfox-boot-starter,可以正常看swagger,但是加了权限包pigx-common-security依赖之后,swagger因为权限问题无法访问了。所以就引入了咱们的 pigx-common-swagger依赖,但是再启动时发现项目无法启动了。报错信息:
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'inMemorySwaggerResourcesProvider' defined in URL [jar:file:/D:/m2repository/io/springfox/springfox-swagger-common/3.0.0/springfox-swagger-common-3.0.0.jar!/springfox/documentation/swagger/web/InMemorySwaggerResourcesProvider.class]: Bean instantiation via constructor failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [springfox.documentation.swagger.web.InMemorySwaggerResourcesProvider]: Constructor threw exception; nested exception is java.lang.IllegalStateException: Multiple Dockets with the same group name are not supported. The following duplicate groups were discovered. default
at org.springframework.beans.factory.support.ConstructorResolver.instantiate(ConstructorResolver.java:315)
如果你 wfs 不是使用 我们提供的骨架工程生成 ,就没有办法引用 common-swagger
你demo-biz 服务新增 common-swagger 是否正常?
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。
如果你 wfs 不是使用 我们提供的骨架工程生成 ,就没有办法引用 common-swagger
你demo-biz 服务新增 common-swagger 是否正常?
demo-biz 服务新增 common-swagger 是正常的
但是加了common-security包依赖以后,wfs就不能访问swagger了,也不行啊。我尝试认证服务pigx-auth项目的WebSecurityConfigurer的configure方法增加 .and().authorizeRequests().antMatchers("/token/", "/actuator/", "/mobile/", "/swagger-ui.html/").permitAll()
增加允许访问/swagger-ui.html的配置,结果还是提示没有权限
嗯 还是按我说的 你使用 骨架创建一个标准的微服务 ,然后把你wfs 里面的代码移动过去
登录 后才可以发表评论