I have this ionic app, that has some pages which are dependent on websockets. And for some time it used the Stomp.over() thing to connect, but It started to give me tons of problems, so I found this @stomp/rx-stomp dependency, but this guy only accepts ws://localhost... as the websocket url... And my API simply won't work with the ws annotation... only http. Here's my WebSocket config on my spring api:
@Configuration
@EnableWebSocketMessageBroker
public class WebSocketConfig extends AbstractWebSocketMessageBrokerConfigurer {
@Override
public void registerStompEndpoints(StompEndpointRegistry registry) {
registry.addEndpoint("/websocket-easy-marine").setAllowedOrigins("*").withSockJS().setWebSocketEnabled(true);
}
@Override
public void configureMessageBroker(MessageBrokerRegistry registry) {
registry.enableSimpleBroker(new String[] { "/send-panel", "/sling-changed", "/wash-engine-changed", "/contract-changed", "/news", "/movement-changed" });
registry.setApplicationDestinationPrefixes("/app");
}
}
And in my pom.xml I'm using this guy:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-websocket</artifactId>
</dependency>
Spring is running the 1.5.10.RELEASE version...