spring boot 整合Swagger2启动报错
-
环境 springboot 2.3.1 swegger 2.2.0
在项目启动时报一下错误
*************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of method linkDiscoverers in org.springframework.hateoas.config.HateoasConfiguration required a single bean, but 15 were found: - modelBuilderPluginRegistry: defined in null - modelPropertyBuilderPluginRegistry: defined in null - typeNameProviderPluginRegistry: defined in null - documentationPluginRegistry: defined in null - apiListingBuilderPluginRegistry: defined in null - operationBuilderPluginRegistry: defined in null - parameterBuilderPluginRegistry: defined in null - expandedParameterBuilderPluginRegistry: defined in null - resourceGroupingStrategyRegistry: defined in null - operationModelsProviderPluginRegistry: defined in null - defaultsProviderPluginRegistry: defined in null - pathDecoratorRegistry: defined in null - 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
原因是版本不支持,修改swegger的版本到2.9.2
上一篇:
IDEA上Java项目控制台中文乱码