Accessing server resources via RESTful endpoints

So far, we have created models, components, services, and service implementations, as well as integrated Spring Security into the messenger application. One thing we have not done is actually created any means by which external clients can communicate with the messenger API. We are going to do this by creating controller classes that handles requests from different HTTP request paths. As always, the first thing we must do is create a package to contain the controllers we are about to create. Create a controllers package now.

The first controller we will implement is the UserController. This controller maps HTTP requests pertaining to a user resource to in-class actions that handle and respond ...

Get Kotlin Programming By Example now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.