JSR-250 compliant standardized rules
JSR-250 Common Annotations for the Java platform defines a series of annotations, some that are security-related, which are intended to be portable across JSR-250 compliant runtime environments. The Spring Framework became compliant with JSR-250 as part of the Spring 2.x release, including the Spring Security framework.
Gradle dependencies
There are several optional dependencies that may be required, depending on what features you decide to use for example to enable the support of JSR 250 @RolesAllowed
annotation. Many of these dependencies are commented as Spring Boot includes them already in the starter parent.
You will find that our build.gradle
file already includes the above dependency (transitively):
//build.gradle // Required for JSR-250 based security: // JSR-250 Annotations implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1'
While JSR-250 annotations are not as expressive as Spring native annotations...