added below annotation for my GlobalExceptionHandler class and then run the mvn command : mvn clean install and run the application, later I am able to view http://localhost:----/swagger-ui/index.html#/
@Hidden @ControllerAdvice