Validate user permission in microservice API endpoint

Hi all,

is there any difference in using one of the following approaches to validate a user role in a microservice API endpoint?

  1. @PreAuthorize("hasRole('ROLE_INVENTORY_READ')")
  2. @RolesAllowed( Roles.ROLE_INVENTORY_READ )

The 1st option is shared in the documentation, but the 2nd seems to be simpler.

Regards, Kai