找不到合适的默认RequestUpgradeStrategy

我正在尝试在Spring上运行Websocket(不是STOMP,而是常规的websocket),如此处所示。 但是,在完成本教程后,我得到以下exception:

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 

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

我能做错什么?

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

如果你使用jetty,你需要tomcat websocket

  org.apache.tomcat.embed tomcat-embed-websocket 8.0.28