摘要:
From:http://stackoverflow.com/questions/3021200/how-to-check-hasrole-in-java-code-with-spring-security1public String createForm(HttpSession session, HttpServletRequest request, ModelMap modelMap) { if (request.isUserInRole("ROLE_ADMIN")) { // code here }}2HttpServletRequest req = (Ht...
阅读全文