Adapting users and roles to Spring Security

We have thought interesting to split apart this section, since users and roles are usually borderline between the application and Spring Security.

Getting ready

In this recipe, we will install the Spring Security dependencies and update the User Entity. We will also create an Authority entity that is based on a custom Role enum that we created. Finally, we update the init.sql script to add a set of existing users.

How to do it...

  1. From the Git Perspective in Eclipse, checkout the latest version of the branch v5.x.x. Then, run a maven clean install command on the cloudstreetmarket-parent module (right-click on the module, go to Run as… | Maven Clean, and then navigate to Run as… | Maven Install). Execute a ...

Get Spring MVC: Designing Real-World Web Applications 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.