swagger忽略方法里参数的方法

 @Bean
    public Docket createRestApi(){
        return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo())
                .select()
                .apis(RequestHandlerSelectors.any())
                .paths(PathSelectors.any()).build()
                .ignoredParameterTypes(UserInfo.class, HttpSession.class);//在此忽略参数的class
    }
posted @ 2021-05-07 11:25  苏南hui  阅读(1332)  评论(0编辑  收藏  举报