In this article, you’ll learn how to use WebSocket API with Spring Boot and build a simple status delivery application at the end.
WebSocket is a communication protocol that makes it possible to establish a two-way communication channel between a server and its client. Websockets are supported by most of the browsers that are commonly used today.
Create an Application
First, you need to set up your Twilio account and a suitable phone number.
- If you haven't yet, sign up for a free Twilio Account
- Purchase a phone number from the Console if you don't yet have one (you'll need one with SMS capability)
Here are the steps to generate a project using Spring Initializr:
- Go to http://start.spring.io/.
- Enter Artifact’s value as websocket-callback.
- Add Websocket in the dependencies section.
- Click Generate Project to download the project.
- Extract the downloaded zip file.
- Note: You will need Java 8 or …