springboot中引入swagger-ui依赖报错

问题

Description:

Parameter 0 of method linkDiscoverers in org.springframework.hateoas.config.HateoasConfiguration required a single bean, but 3 were found:
	- relProviderPluginRegistry: defined by method 'relProviderPluginRegistry' in class path resource [org/springframework/hateoas/config/HateoasConfiguration.class]
	- linkDiscovererRegistry: defined in null
	- entityLinksPluginRegistry: defined by method 'entityLinksPluginRegistry' in class path resource [org/springframework/hateoas/config/WebMvcEntityLinksConfiguration.class]

Action:

Consider marking one of the beans as @Primary, updating the consumer to accept multiple beans, or using @Qualifier to identify the bean that should be consumed

这里是因为依赖版本太老了,用的是2.5.6版本的springboot,2.2的swagger太老了。

解决方式就是换新一点的swagger依赖或者降低springboot版本。

上一篇:36-【go】windows下如何安装swag命令


下一篇:YAPI 导入 Swagger