title: JAX RS and WebSockets with Stomp in Spring Boot conflict
body: <p>I am using Spring-Boot. I would like to use JAX RS as my basic REST-API in combination with WebSockets (using Stomp). However, these two libraries seem to end up in a conflict.</p>
  
  <p>I have the following WebSocketConfig:</p>
  
  <pre><code>@Configuration
  @EnableWebSocketMessageBroker
  public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
  
  @Override
  public void configureMessageBroker(MessageBrokerRegistry config) {
      config.enableSimpleBroker("/topic");
      config.setApplicationDestinationPrefixes("/app");
  }
  
  @Override
  public void registerStompEndpoints(StompEndpointRegistry registry) {
      registry.addEndpoint("/hello").setAllowedOrigins("http://localhost:8000").withSockJS();
  }
  </code></pre>
  
  <p>and the following AppConfig:</p>
  
  <pre><code>public class AppConfig extends ResourceConfig {
     public AppConfig() {
        register(...);
     }
  }
  </code></pre>
  
  <p>The problem occurs, if both classes are commented in. If I comment out AppConfig, my socket-connection will connect without any problems. In the other cases, my REST-Api works but the WebSocket-Connection cannot be established (404 exception). I assume the problem lies in the Jax RS component which probably tries to 'consume' the /hello call and does not find a resource mapped to it.</p>
  
  <p>My question is: How can I tell Jax RS to either ignore the /hello call, so that it gets passed through to the WebSocketMessageBroker or to get it working next to each other?</p>