簡體   English   中英

找不到合適的默認RequestUpgradeStrategy

[英]No suitable default RequestUpgradeStrategy found

我想在春季運行的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

我在幾個版本的Tomcat上得到了這個,最新的(我認為應該有JSR 356支持)是一個Tomcat 7.0.50

我能做錯什么?

我只需更新到Tomcat 7.0.52即可解決此問題。

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

<dependency>
    <groupId>org.apache.tomcat.embed</groupId>
    <artifactId>tomcat-embed-websocket</artifactId>
    <version>8.0.28</version>
</dependency>

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM