Add database authentication to Spring Data Rest application

I’m creating an application using Spring Data REST with Thymeleaf. Initially I created my models, controllers, dao and services. All worked fine. I’m now trying to add security to my application. …

How to properly access a secured Spring Data REST Repository in a ApplicationRunner?

I followed the documentation on how to secure REST repositories with @PreAuthorize. However, the following repository @PreAuthorize(“hasRole(‘ROLE_ADMIN’)”) @RepositoryRestResource public interface …