I have read following topic:
[Disabling Swagger with Spring MVC](https://stackoverflow.com/a/27976261/2674303)

and I wrote:

```
@Bean
public Docket api() {
    return new Docket(DocumentationType.SWAGGER_2)
            .select()
            .apis(RequestHandlerSelectors.basePackage("com.project.name.controller"))
            .paths(PathSelectors.ant("/api/**"))
            .build()
            .apiInfo(apiInfo())
            .enable(false);
}

```

But in case if I try to access swagger ui: `localhost:8080/swagger-ui.html`  

I see
[![enter image description here](https://i.stack.imgur.com/Q1Ihv.jpg)](https://i.stack.imgur.com/Q1Ihv.jpg)

It looks not accurate. Can I fully disabled this URL ? 404 for example or something like this.