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
Rossen was correct. The addition of the element will add the SimpMessagingTemplate bean to the context for injection. This has to be in the web app root context, not the context for Spring DispatchServlet. E.g., in the following web.xml file, the message-broker element should be included in app-root.xml file. Including only in app-mvc.xml will cause NoSuchBeanDefinitionException.
contextConfigLocation
classpath:/spring/app-root.xml
Spring MVC Dispatcher Servlet
org.springframework.web.servlet.DispatcherServlet
contextConfigLocation
classpath:/spring/app-mvc.xml
1