title: Added Springfox Swagger-UI and it's not working, what am I missing?
body: <p>Following the instructions here:</p>
  
  <p><a href="http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api" rel="noreferrer">http://www.baeldung.com/swagger-2-documentation-for-spring-rest-api</a></p>
  
  <p>I added these dependencies to my project:</p>
  
  <pre><code>compile "io.springfox:springfox-swagger2:2.7.0"
  compile "io.springfox:springfox-swagger-ui:2.7.0"
  </code></pre>
  
  <p>and configured SpringFox Swagger like this:</p>
  
  <pre><code>import org.springframework.context.annotation.Bean;
  import org.springframework.context.annotation.Configuration;
  import springfox.documentation.builders.PathSelectors;
  import springfox.documentation.builders.RequestHandlerSelectors;
  import springfox.documentation.spi.DocumentationType;
  import springfox.documentation.spring.web.plugins.Docket;
  import springfox.documentation.swagger2.annotations.EnableSwagger2;
  
  @Configuration
  @EnableSwagger2
  public class SwaggerConfig {
      @Bean
      public Docket api() {
          return new Docket(DocumentationType.SWAGGER_2)
                  .select()
                  .apis(RequestHandlerSelectors.any())
                  .paths(PathSelectors.any())
                  .build();
      }
  }
  </code></pre>
  
  <p>but the Swagger UI seems not to get enabled. I tried:</p>
  
  <ul>
  <li><a href="http://localhost:8080/swagger-ui.html" rel="noreferrer">http://localhost:8080/swagger-ui.html</a></li>
  <li><a href="http://localhost:8080/api/swagger-ui.html" rel="noreferrer">http://localhost:8080/api/swagger-ui.html</a></li>
  <li><a href="http://localhost:8080/v2/api-docs/swagger-ui.html" rel="noreferrer">http://localhost:8080/v2/api-docs/swagger-ui.html</a></li>
  </ul>
  
  <p>and all I get is:</p>
  
  <pre><code>Whitelabel Error Page
  
  This application has no explicit mapping for /error, so you are seeing this as a fallback.
  
  Mon Sep 11 09:43:46 BST 2017
  There was an unexpected error (type=Method Not Allowed, status=405).
  Request method 'GET' not supported
  </code></pre>
  
  <p>and on the logs I see:</p>
  
  <pre><code>2017-09-11 09:54:31.020  WARN 15688 --- [nio-8080-exec-6] o.s.web.servlet.PageNotFound             : Request method 'GET' not supported
  2017-09-11 09:54:31.020  WARN 15688 --- [nio-8080-exec-6] .w.s.m.s.DefaultHandlerExceptionResolver : Resolved exception caused by Handler execution: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'GET' not supported
  </code></pre>
  
  <p><a href="http://localhost:8080/swagger-resources" rel="noreferrer">http://localhost:8080/swagger-resources</a> returns:</p>
  
  <pre><code>[{"name": "default",
    "location": "/v2/api-docs",
    "swaggerVersion": "2.0"}]
  </code></pre>
  
  <p>What am I missing?</p>