cvc-complex-type.2.4.c: but no declaration can be found for element 'websocket:h

barrassed 2016-09-13 05:04:51
<?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:context="http://www.springframework.org/schema/context"
xmlns:websocket="http:/www.springframework.org/schema/websocket"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-4.3.xsd
http://www.springframework.org/schema/websocket
http://www.springframework.org/schema/websocket/spring-websocket-4.3.xsd ">

<websocket:handlers>
<websocket:mapping path="/IM" handler="MyWebSocketHandler"/>
<websocket:handshake-interceptors>
<bean class="org.springframework.web.socket.server.support.HttpSessionHandshakeInterceptor"/>
</websocket:handshake-interceptors>
</websocket:handlers>
</beans>

无法找到'websocket:handlers'定义,通过Ctrl+鼠标点击“http://www.springframework.org/schema/websocket/spring-websocket-4.3.xsd”是能打开的,并且能找到这个参数定义。 请高手找找原因,谢谢。 环境Spring4.3.2 + tomcat8 + jdk1.8
...全文
145 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
I,Frankenstein 2016-09-13
  • 打赏
  • 举报
回复
引用 2 楼 barrassed 的回复:
[quote=引用 1 楼 u013185616 的回复:] 难道是你 xmlns:websocket="http:/www.springframework.org/schema/websocket" 这个地方少了个 “/” 造成的??
=。= 你说对了,谢了。[/quote]
barrassed 2016-09-13
  • 打赏
  • 举报
回复
引用 1 楼 u013185616 的回复:
难道是你 xmlns:websocket="http:/www.springframework.org/schema/websocket" 这个地方少了个 “/” 造成的??
=。= 你说对了,谢了。
I,Frankenstein 2016-09-13
  • 打赏
  • 举报
回复
难道是你 xmlns:websocket="http:/www.springframework.org/schema/websocket" 这个地方少了个 “/” 造成的??

81,094

社区成员

发帖
与我相关
我的任务
社区描述
Java Web 开发
社区管理员
  • Web 开发社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧