Fixed bug, when basic-error-controller was displayed in Swagger
@@ -11,6 +11,8 @@ import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import org.springframework.http.ResponseEntity;
+import org.springframework.web.bind.annotation.RestController;
+import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.ApiKey;
import springfox.documentation.service.AuthorizationScope;
@@ -57,7 +59,7 @@ public class SwaggerConfig {
.securitySchemes(Lists.newArrayList(apiKey()))
.useDefaultResponseMessages(false);
- docket = docket.select().paths(regex(DEFAULT_INCLUDE_PATTERN)).build();
+ docket = docket.select().apis(RequestHandlerSelectors.withClassAnnotation(RestController.class)).build();
return docket;
}
