其他分享
首页 > 其他分享> > springboot中引入swagger-ui依赖报错

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版本。

标签:springboot,hateoas,defined,ui,报错,swagger,config,class
来源: https://www.cnblogs.com/sxq123/p/15525620.html