<websocket:handlers allowed-origins="*"> <websocket:mapping path="/websocket" handler="myHandler"/> <websocket:handshake-interceptors> <ref bean="myInterceptor"/> </websocket:handshake-interceptors> </websocket:handlers>
加上這一句就夠了 web
allowed-origins="*"websocket