One doubt, I am using Spring boot and Spring Security but if I want to assign roles to my users I have to write the following note in each microservice:
@PreAuthorize("hasAuthority('ADMIN')")
I've also seen it in the WebConfig but it's a bit of the same. Is there no other way to do this without having to handle it in code? a database for example?