Java Code Examples for com.xxl.job.admin.controller.annotation.PermessionLimit#limit()
The following examples show how to use
com.xxl.job.admin.controller.annotation.PermessionLimit#limit() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PermissionInterceptor.java From open-capacity-platform with Apache License 2.0 | 6 votes |
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if (!(handler instanceof HandlerMethod)) { return super.preHandle(request, response, handler); } if (!ifLogin(request)) { HandlerMethod method = (HandlerMethod)handler; PermessionLimit permission = method.getMethodAnnotation(PermessionLimit.class); if (permission == null || permission.limit()) { response.sendRedirect(request.getContextPath() + "/toLogin"); //request.getRequestDispatcher("/toLogin").forward(request, response); return false; } } return super.preHandle(request, response, handler); }
Example 2
Source File: PermissionInterceptor.java From microservices-platform with Apache License 2.0 | 6 votes |
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if (!(handler instanceof HandlerMethod)) { return super.preHandle(request, response, handler); } if (!ifLogin(request)) { HandlerMethod method = (HandlerMethod)handler; PermessionLimit permission = method.getMethodAnnotation(PermessionLimit.class); if (permission == null || permission.limit()) { response.sendRedirect(request.getContextPath() + "/toLogin"); //request.getRequestDispatcher("/toLogin").forward(request, response); return false; } } return super.preHandle(request, response, handler); }
Example 3
Source File: PermissionInterceptor.java From zuihou-admin-boot with Apache License 2.0 | 6 votes |
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if (!(handler instanceof HandlerMethod)) { return super.preHandle(request, response, handler); } if (!ifLogin(request)) { HandlerMethod method = (HandlerMethod) handler; PermessionLimit permission = method.getMethodAnnotation(PermessionLimit.class); if (permission == null || permission.limit()) { response.sendRedirect(request.getContextPath() + "/toLogin"); //request.getRequestDispatcher("/toLogin").forward(request, response); return false; } } return super.preHandle(request, response, handler); }
Example 4
Source File: PermissionInterceptor.java From zuihou-admin-cloud with Apache License 2.0 | 6 votes |
@Override public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { if (!(handler instanceof HandlerMethod)) { return super.preHandle(request, response, handler); } if (!ifLogin(request)) { HandlerMethod method = (HandlerMethod) handler; PermessionLimit permission = method.getMethodAnnotation(PermessionLimit.class); if (permission == null || permission.limit()) { response.sendRedirect(request.getContextPath() + "/toLogin"); //request.getRequestDispatcher("/toLogin").forward(request, response); return false; } } return super.preHandle(request, response, handler); }