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

前端 未结 14 2186
忘掉有多难
忘掉有多难 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 16:16

    For me this link helped: https://github.com/spring-projects/spring-hateoas/issues/731

    In a nutshell i added to my dependencies:

    <dependency>
        <groupId>org.springframework.plugin</groupId>
        <artifactId>spring-plugin-core</artifactId>
        <version>2.0.0.RELEASE</version>
    </dependency>
    
    0 讨论(0)
  • 2020-12-09 16:19

    I had this issue with Swagger + HATEOAS in my spring-boot application.

    The fix is given below (edit your Swagger configuration class):

    @Configuration
    @EnableSwagger2
    public class SwaggerConfiguration {
    
        @Bean
        public LinkDiscoverers discoverers() {
            List<LinkDiscoverer> plugins = new ArrayList<>();
            plugins.add(new CollectionJsonLinkDiscoverer());
            return new LinkDiscoverers(SimplePluginRegistry.create(plugins));
    
        }
    }
    
    0 讨论(0)
提交回复
热议问题