title: Spring security check if user has access to mentioned url
body: <p>I have started using spring security, and after a lot of research I am not able to find an answer for:</p>
  
  <p>If I explicitly want to check if user A have access to stuff B. I can check this with JSP tag support <a href="https://stackoverflow.com/questions/12236448/spring-security-check-if-web-url-is-secure-protected">Spring Security - check if web url is secure / protected</a> like </p>
  
  <pre><code>&lt;sec:authorize url="stuff/B"&gt;
  </code></pre>
  
  <p>But what if I want to check the same thing in the controller(java class). I am not finding any spring function here to check if a login user has access to mentioned url(<a href="https://docs.spring.io/spring-security/site/docs/3.0.x/reference/el-access.html" rel="noreferrer">https://docs.spring.io/spring-security/site/docs/3.0.x/reference/el-access.html</a>)   </p>