From the course: Building Real-Time Web Apps with Spring Boot and WebSockets
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Create message controllers
From the course: Building Real-Time Web Apps with Spring Boot and WebSockets
Create message controllers
- [Narrator] Our real-time spring app is built using the spring MVC application design pattern. Therefore controller components will definitely be needed. For our next coding exercise, we will create a controller for our chat app and walk through how to implement the method for handling chat messages that come in. Remember, in our app the controller's main responsibility is to map a handler method, to particular message destinations, and application URIs. We will complete a simple controller for our exercise, but in a more mature app, you would likely develop multiple controllers to handle the different responsibilities and logic for a variety of topic subscriptions. Imagine fully implementing the scenarios for our landing events management app. Remember that ultimately, this app should handle guest to guest chat, guest to host chats, and hosts to venue chats that could require multiple controllers to really implement that. So for our next exercise we're gonna implement our simple…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.