Remove Basic Error Controller In SpringFox SwaggerUI

Rajkishan Swami picture Rajkishan Swami · Oct 5, 2015 · Viewed 21.5k times · Source

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

Picture:

enter image description here

Answer

Carsten Zeitz picture Carsten Zeitz · Nov 15, 2015

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" ) )
        ...