<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:mvc="http://www.springframework.org/schema/mvc"
       xmlns:websocket="http://www.springframework.org/schema/websocket"
       xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/mvc
        http://www.springframework.org/schema/mvc/spring-mvc.xsd
        http://www.springframework.org/schema/websocket
        http://www.springframework.org/schema/websocket/spring-websocket.xsd">
        
    <!--配置 webSocket-->
    <bean id="systemWebSocketHandler" class="com.goafanti.core.websocket.SystemWebSocketHandler" scope="singleton"></bean>
    
    <websocket:handlers allowed-origins="*">
        <!--指定 webSocket 地址-->
        <websocket:mapping path="/webSocketServer" handler="systemWebSocketHandler"/>
        <!-- 过滤器 -->
         <websocket:handshake-interceptors>
        	<bean class="com.goafanti.core.websocket.WebSocketHandshakeInterceptor"/>
        </websocket:handshake-interceptors>  
    </websocket:handlers>
 
</beans>