This question most likely has been asked before. But I couldn't find it because searching a real hashtag in Google seems to be difficult. I suppose it's not called a hashtag and it's one of the relatively rare moments where my English fails me (2nd language).
So despite this being a duplicate, I'd argue to keep it on the site so that it is easier searchable via Google (and the SO site itself!).
I have the following code.
@GetMapping("/users")
@Timed
@PreAuthorize("hasAuthority('ADMINISTRATOR') or #oauth2.hasScope('some-user-list')")
public ResponseEntity<List<UserDTO>> getAllUsers(@ApiParam Pageable pageable) {
final Page<UserDTO> page = userService.getAllUsers(pageable);
HttpHeaders headers = PaginationUtil.generatePaginationHttpHeaders(page, "/users");
return new ResponseEntity<>(page.getContent(), headers, HttpStatus.OK);
}
What does the #
mean (in particular for #oauth2
, I know what authentication is and what oauth does, I just don't understand the #
as a concept in Spring)? How is it called? This doesn't seem to pertain to the Java language itself, so how does Spring Boot call this concept?