Search code examples
swagger-uiswagger-2.0springfox

Remove Basic Error Controller In SpringFox SwaggerUI


Is there a way i can remove the "basic-error-controller" from springfox swagger-ui?

Picture:

enter image description here


Solution

  • You can restrict the request handler selector to scan only the package of your project:

        return new Docket( DocumentationType.SWAGGER_2)
            .select()
            .apis( RequestHandlerSelectors.basePackage( "your package" ) )
            ...