November 2017
Intermediate to advanced
542 pages
14h 24m
English
The request attribute is fairly self-explanatory, but we have provided a few examples in the following code. Remember, any of these examples could be placed in the antMatchers() method's access attribute or the <sec:authorize> element's access attribute:
// allows only HTTP GETrequest.method == 'GET' // allow anyone to perform a GET, but // other methods require ROLE_ADMIN request.method == 'GET' ? permitAll : hasRole('ADMIN')
Read now
Unlock full access