You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

applicationContext.xml 2.1 kB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <beans xmlns="http://www.springframework.org/schema/beans"
  3. xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  4. xmlns:context="http://www.springframework.org/schema/context"
  5. xmlns:websocket="http://www.springframework.org/schema/websocket"
  6. xmlns:aop="http://www.springframework.org/schema/aop"
  7. xsi:schemaLocation="http://www.springframework.org/schema/beans
  8. http://www.springframework.org/schema/beans/spring-beans.xsd
  9. http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
  10. http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop.xsd
  11. http://www.springframework.org/schema/websocket
  12. http://www.springframework.org/schema/websocket/spring-websocket.xsd">
  13. <aop:aspectj-autoproxy/>
  14. <context:component-scan base-package="com.educoder.bridge.controller"/>
  15. <context:component-scan base-package="com.educoder.bridge.service"/>
  16. <context:component-scan base-package="com.educoder.bridge.handler"/>
  17. <!-- freemaker配置 -->
  18. <bean id="freemarkerConfig"
  19. class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
  20. <property name="templateLoaderPath" value="/WEB-INF/pages/" />
  21. <property name="freemarkerSettings">
  22. <props>
  23. <prop key="template_update_delay">0</prop>
  24. <prop key="default_encoding">UTF-8</prop>
  25. <prop key="number_format">0.##########</prop>
  26. <prop key="datetime_format">yyyy-MM-dd HH:mm:ss</prop>
  27. <prop key="classic_compatible">true</prop>
  28. <prop key="template_exception_handler">ignore</prop>
  29. </props>
  30. </property>
  31. </bean>
  32. <!--注册消息处理器,指定WebsshHandler处理消息,并将/ws映射到其中-->
  33. <websocket:handlers allowed-origins="*">
  34. <websocket:mapping path="/ws" handler="websshHandler"/>
  35. </websocket:handlers>
  36. <bean id="websshHandler" class="com.educoder.bridge.handler.WebsshHandler"/>
  37. </beans>

No Description

Contributors (1)