title: JAX-RS - Spring Boot vs without Spring Boot
body: <p>I want to use Spring boot with JAX-RS (Jersey Implementation). If we were not using Spring Boot, we could use the following code to register all the Rest service classes</p>
  
  <pre><code>@ApplicationPath("/myrest")
  public class MyApplication extends Application {
      @Override
      public Set&lt;Class&lt;?&gt;&gt; getClasses() {
          Set&lt;Class&lt;?&gt;&gt; s = new HashSet&lt;Class&lt;?&gt;&gt;();
          s.add(HelloWorld.class);
          return s;
      }
  }
  </code></pre>
  
  <p>This works fine in a Servlet 3.0 supported container.</p>
  
  <p>But when we use Spring Boot with JAX-RS(Jersey) why do we have to extend from <code>org.glassfish.jersey.server.ResourceConfig</code> Why extending from <code>javax.ws.rs.core.Application</code> doesn't work?</p>