© Jorge Acetozi 2017

Jorge Acetozi, Pro Java Clustering and Scalability, https://doi.org/10.1007/978-1-4842-2985-9_10

10. Spring WebSocket

Jorge Acetozi

(1)São Paulo / SP, Brazil

Spring WebSocket provides good support for WebSocket applications, and it’s easy to use when you understand what’s going on behind the scenes. This chapter will help you to start understanding some of the Spring WebSocket configuration possibilities.

10.1 Raw WebSocket Configuration

Although you’re not going to use a raw WebSocket configuration in the chat app, here is what its configuration on Spring would look like:

@Configuration@EnableWebSocketpublic class RawWebSocketConfiguration implements WebSocketConfigurer {  @Override  public void registerWebSocketHandlers(WebSocketHandlerRegistry ...

Get Pro Java Clustering and Scalability: Building Real-Time Apps with Spring, Cassandra, Redis, WebSocket and RabbitMQ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.