Swagger not detecting Spring Data Rest APIs with Spring Boot

后端 未结 4 934
名媛妹妹
名媛妹妹 2021-02-04 05:21

I setup a Spring Boot project including Spring Data Rest and Swagger:


        org.springframework.boot
                 


        
4条回答
  •  闹比i
    闹比i (楼主)
    2021-02-04 05:58

    Upgrade to latest version of swagger

        
            io.springfox
            springfox-swagger2
            2.7.0
        
        
            io.springfox
            springfox-data-rest
            2.7.0
        
        
            io.springfox
            springfox-swagger-ui
            2.7.0
        
    

    Additionally import spring data rest annotation on spring Configuration/Application class.

    @Import(SpringDataRestConfiguration.class)
    

提交回复
热议问题