According to article Preview Spring Security WebSocket Support, Spring Security 4x now fully support Web Socket => happy

For people who wanna to see a complete example Example Spring Security 4x support Web Socket

Caution, by default Spring Security will be failed if there is a Reverse proxy on the server. To fix this, the server need to be configured to support Web Socket handshake. For example this is configuration of Nginx