找不到合适的默认RequestUpgradeStrategy

Kri*_*tof 7 java spring tomcat spring-mvc

我想在春季运行的WebSocket(不跺脚,但普通的WebSocket)所看到这里.但是,在完成本教程之后,我得到以下异常:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.web.socket.server.support.DefaultHandshakeHandler#0': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [org.springframework.web.socket.server.support.DefaultHandshakeHandler]: Constructor threw exception; nested exception is java.lang.IllegalStateException: No suitable default RequestUpgradeStrategy found
Run Code Online (Sandbox Code Playgroud)

我在几个版本的Tomcat上得到了这个,最新的(我认为应该有JSR 356支持)是一个Tomcat 7.0.50

我能做错什么?

小智 6

我只需更新到Tomcat 7.0.52即可解决此问题.