title: Swagger 2.0: swagger-ui page showing default api info instead of the custom api info which I am setting
body: <p>I am using docket api to configure swagger in a spring mvc project. The swagger-ui is correctly showing all the paths. However, the custom API information like title, description, license, etc. are showing only the default values and not the values which I am setting. </p>
  
  <p>Debugging:
  In the method "apiDocket()" in the class "SwaggerConfiguration", I checked the value of the field "apiInfo" for the object "docket" just before the return statement (using reflection). The values are correctly getting set. So clearly the problem is elsewhere which I am not being able to detect. 
  I am using sprinfox-swagger version 2.9.2. I have tried with 2.9.1, 2.8.0, 2.7.0 and 2.6.1 just to check. I got the same results.
  The problem which I am facing has been raised at <a href="https://stackoverflow.com/questions/47742734/swagger-doesnt-pick-up-customized-api-info-and-always-shows-default-values">Swagger doesn&#39;t pick up customized API Info and always shows default values</a> and <a href="https://stackoverflow.com/questions/50347994/spring-boot-swagger-custom-information-about-api-not-working">Spring boot swagger :custom information about Api not working</a> but I have not got my solution. </p>
  
  <pre><code>@Configuration
  @EnableSwagger2
  public class SwaggerConfiguration {
  
      @Bean
      public Docket apiDocket() {
  
          ApiInfo apiInfo = getApiInfo();
          Docket docket = new Docket(DocumentationType.SWAGGER_2)
                  .select()
                  .apis(RequestHandlerSelectors.any())
                  .paths(PathSelectors.any())
                  .build();
          docket.apiInfo(apiInfo);
          return docket;
      }
  
      private ApiInfo getApiInfo() {
  
          return new ApiInfo(
                  "TITLE",
                  "DESCIPRION",
                  "VERSION",
                  "TERMS OF SERVICE URL",
                  new Contact("NAME","URL","EMAIL"),
                  "LICENSE",
                  "LICENSE URL",
                  Collections.emptyList()
          );
      }
  }
  </code></pre>
  
  <p>In the servlet config xml file, I have the following:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;beans xmlns="http://www.springframework.org/schema/beans"
      xmlns:context="http://www.springframework.org/schema/context"
      xmlns:mvc="http://www.springframework.org/schema/mvc" xmlns:p="http://www.springframework.org/schema/p"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd                 http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd                 http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-3.1.xsd"&gt;
  
      &lt;!-- The controllers are autodetected POJOs labeled with the @Controller 
          annotation. --&gt;
      &lt;context:component-scan base-package="com.sample.package"
          use-default-filters="false"&gt;
          &lt;context:include-filter
              expression="org.springframework.stereotype.Controller" type="annotation" /&gt;
          &lt;context:include-filter type="annotation"
              expression="org.springframework.web.bind.annotation.ControllerAdvice" /&gt;
          &lt;!-- &lt;context:include-filter type="regex" expression=".*SwaggerConfiguration.*"/&gt; --&gt;
      &lt;/context:component-scan&gt;
  
      &lt;context:property-placeholder location="classpath*:META-INF/spring/*.properties"/&gt;
  
      &lt;!-- Turns on support for mapping requests to Spring MVC @Controller 
          methods Also registers default Formatters and Validators for use across all 
          @Controllers --&gt;
      &lt;mvc:annotation-driven /&gt;
  
      &lt;mvc:default-servlet-handler /&gt;
  
      &lt;mvc:interceptors&gt;
      &lt;bean class="com.sample.package.CustomRequestHandler"/&gt;
      &lt;/mvc:interceptors&gt;
  
      &lt;!-- Enable scanning of spring @Configuration classes --&gt;
      &lt;context:annotation-config /&gt;
  
      &lt;bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver"&gt;
      &lt;/bean&gt;
      &lt;bean id="swagger2Config"
          class="springfox.documentation.swagger2.configuration.Swagger2DocumentationConfiguration"&gt;
      &lt;/bean&gt;
      &lt;mvc:resources order="1" location="/resources/"
      mapping="/resources/**" /&gt;
      &lt;mvc:resources mapping="swagger-ui.html"
      location="classpath:/META-INF/resources/" /&gt;
      &lt;mvc:resources mapping="/webjars/**"
      location="classpath:/META-INF/resources/webjars/" /&gt;
  &lt;/beans&gt;
  </code></pre>
  
  <p>In my pom.xml I have </p>
  
  <pre><code>            &lt;dependency&gt;
                  &lt;groupId&gt;io.springfox&lt;/groupId&gt;
                  &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
                  &lt;version&gt;2.9.2&lt;/version&gt;
              &lt;/dependency&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;io.springfox&lt;/groupId&gt;
                  &lt;artifactId&gt;springfox-swagger-ui&lt;/artifactId&gt;
                  &lt;version&gt;2.9.2&lt;/version&gt;
              &lt;/dependency&gt;
  </code></pre>
  
  <p>In the swagger-ui page, I expect the title to be "TITLE", description to be "DESCRIPTION, version to be "VERSION", as evident from the method "getApiInfo()" in the code snippet. However, I am getting title as "Api Documentation", description as "Api Documentation", and version as "1.0". These are all default values and the values which I am setting in the code are not getting reflected in the swagger-ui page.
  Please help!</p>