Could not autowire. No beans of SimpMessagingTemplate type found

后端 未结 4 977
自闭症患者
自闭症患者 2020-12-31 03:09

I am configuring Websockets in Spring basically by following the guide provided in the documentation.

I am currently trying to send a message from the server to the

4条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-31 03:33

    Strange, because when you use the websocket namespace, the "message-broker" element causes the creation of a SimpMessagingTemplate bean which should then be available for you to inject. Are both the controller and the websocket namespace in the same ApplicationContext or is perhaps one in the "root" context and the other in the DispatcherServlet context?

提交回复
热议问题