Why HATEOAS starts creating issue for spring-boot version >= 2.2.x during startup with Swagger 2.x?

前端 未结 14 2251
忘掉有多难
忘掉有多难 2020-12-09 15:18

I moved my project from spring-boot 2.1.9 to 2.2.0.

While starting the project, I am facing the below error messages.

Caused by: org.sprin         


        
14条回答
  •  鱼传尺愫
    2020-12-09 15:54

    I am using springdoc-openapi and after having encountered this problem similar to the one mentioned here:

    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
    

    I just add this dependency in my pom file

    
        org.springframework.hateoas
        spring-hateoas
        1.1.1.RELEASE
    
    

    hope that this can help someone

提交回复
热议问题