如何解决Spring Boot 2.2.4 springdoc OpenApi Swagger V3发行版
在集成springdoc-openapi-data-rest库以映射Pageable(spring-date-commons)对象以纠正Swagger UI中的URL参数之后,我遇到了此问题:
***************************
APPLICATION FAILED TO START
***************************
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
Process finished with exit code 0
请问我如何有效地解决这个问题?谢谢
解决方法
要通过在pom文件中添加此依赖关系来解决此问题:
<dependency>
<groupId>org.springframework.hateoas</groupId>
<artifactId>spring-hateoas</artifactId>
<version>1.1.1.RELEASE</version>
</dependency>
的启发
希望这可以帮助某人
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。