💻 개발IT/Spring

[swagger] No operations defined in spec!

초겨울 2022. 8. 26. 12:30

http://~/swagger-ui.html 에서 

 

No operations defined in spec!

 

만 보일 때,

 

basePackage 가 프로젝트 패키지 맞는지 확인

    @Bean
    public Docket api() {
        return new Docket(DocumentationType.SWAGGER_2)
                .apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.basePackage("com.example.demo"))
                .paths(PathSelectors.any())
                .build();
    }

 

반응형