title: In Spring Data Rest, Swagger2 configuration issue by using profile
body: <pre><code>        &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-swagger2&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-SNAPSHOT&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;3.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.springfox&lt;/groupId&gt;
              &lt;artifactId&gt;springfox-data-rest&lt;/artifactId&gt;
              &lt;version&gt;3.0.0-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
  </code></pre>
  
  <pre class="lang-java prettyprint-override"><code>@Profile({"dev-test", "local-test"})
  @Configuration
  @EnableSwagger2WebMvc
  public class SwaggerConfig {
  
      @Bean
      public Docket documentation() {
          return new Docket(DocumentationType.SWAGGER_2)
                  .select()
                  .apis(RequestHandlerSelectors.any())
                  .paths(s -&gt; s.matches("/_api/.*"))
                  .build();
      }
  }
  </code></pre>
  
  <p>This error occurs when the <code>profile</code> is not <strong>local-test</strong> or <strong>dev-test.</strong></p>
  
  <pre><code>***************************
  APPLICATION FAILED TO START
  ***************************
  
  Description:
  
  Parameter 4 of constructor in springfox.documentation.spring.data.rest.EntityServicesProvider required a bean of type 'com.fasterxml.classmate.TypeResolver' that could not be found.
  
  
  Action:
  
  Consider defining a bean of type 'com.fasterxml.classmate.TypeResolver' in your configuration.
  </code></pre>
  
  <p>Hi, i'm using <code>Swagger3.0</code> with Spring Data Rest.</p>
  
  <p>This is the link I referenced.
  <a href="https://stackoverflow.com/a/46458135/10345277">https://stackoverflow.com/a/46458135/10345277</a></p>
  
  <p><strong>What I'm doing is trying to turn the Swagger on or off by Profile.</strong></p>
  
  <p>However, unlike the above link, I use SDR and <code>springfox.documentation.spring.data.rest</code> throws an error.</p>
  
  <p>Is there a solution?</p>