title: Jersey doesn't register my resource
body: <p>I have a very basic application using Spring Boot(2.0.0) and Jersey. Unfortunately when I try to call exposed endpoints I get error 404.</p>
  
  <p>My code looks like this:</p>
  
  <p>Main class:</p>
  
  <pre><code>public class App {
      public static void main( String[] args )  {
          SpringApplication.run(App.class, args);
      }
  }
  </code></pre>
  
  <p>Jersey config:</p>
  
  <pre><code>@Component
  @ApplicationPath("/api")
  public class JerseyConfig extends ResourceConfig{
      public JerseyConfig() {
          register(FileResource.class);
      }
  }
  </code></pre>
  
  <p>Resource:</p>
  
  <pre><code>@Component
  @Consumes(MediaType.APPLICATION_JSON)
  public class FileResource {
  
      @POST
      @Path("/uploadfile")
      @Consumes(MediaType.MULTIPART_FORM_DATA)
      public void upload(@FormDataParam("file") InputStream fileInputStream,
              @FormDataParam("file") FormDataContentDisposition disposition) {
          System.out.println(disposition.getName());
  
      }
  
      @GET
      @Path("/foo")
      public String foo() {
          return "foo";
      }
  }
  </code></pre>
  
  <p>Maven dependecies:</p>
  
  <pre><code>  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.0.0.RELEASE&lt;/version&gt;
    &lt;/parent&gt;
  
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
    &lt;artifactId&gt;spring-boot-starter-jersey&lt;/artifactId&gt;
  &lt;/dependency&gt;
  &lt;dependency&gt;
    &lt;groupId&gt;com.sun.jersey.contribs&lt;/groupId&gt;
    &lt;artifactId&gt;jersey-multipart&lt;/artifactId&gt;
    &lt;version&gt;1.8&lt;/version&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>When I call:</p>
  
  <pre><code>GET /api/foo HTTP/1.1
  Host: localhost:8080
  Content-Type: application/json
  </code></pre>
  
  <p>I get:</p>
  
  <pre><code>{
      "timestamp": "2018-03-27T08:37:13.926+0000",
      "status": 404,
      "error": "Not Found",
      "message": "Not Found",
      "path": "/api/foo"
  }
  </code></pre>
  
  <p>The same happens for the second endpoint. In application logs I can find <code>Servlet .....JerseyConfig mapped to [/api/*]</code>
  Does anybody knows what is wrong with it? </p>