How is it possible to access variables from method signature?
In spring security there is the @PreAuthorize annotation that can make use of hasPermission and access variables passed to the method with #locationDTO
@PreAuthorize("hasPermission(#locationDTO.parent, 'Location', 'LOCATION_CREATE') ")
public ResponseEntity createLocation(@RequestBody Location locationDTO) {
.....
}
I would like to create a custom annotation that has access to the variables in the same way - how is that possible?