Java Code Examples for org.apache.shiro.authz.AuthorizationException#printStackTrace()
The following examples show how to use
org.apache.shiro.authz.AuthorizationException#printStackTrace() .
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: AdminMyControllerAdvice.java From ZTuoExchange_framework with MIT License | 5 votes |
/** * 拦截捕捉无权限异常 * * @param ex * @return */ @ResponseBody @ExceptionHandler(value = AuthorizationException.class) public MessageResult handleAuthorizationError(AuthorizationException ex) { ex.printStackTrace(); MessageResult result = MessageResult.error(5000, "unauthorized"); return result; }
Example 2
Source File: AdminMyControllerAdvice.java From ZTuoExchange_framework with MIT License | 5 votes |
@ResponseBody @ExceptionHandler({AuthenticationException.class,UnauthenticatedException.class}) public MessageResult handleAuthenticationError(AuthorizationException ex) { ex.printStackTrace(); MessageResult result = MessageResult.error(4000, "please login"); return result; }
Example 3
Source File: AdminMyControllerAdvice.java From ZTuoExchange_framework with MIT License | 5 votes |
/** * 拦截捕捉无权限异常 * * @param ex * @return */ @ResponseBody @ExceptionHandler(value = AuthorizationException.class) public MessageResult handleAuthorizationError(AuthorizationException ex) { ex.printStackTrace(); MessageResult result = MessageResult.error(5000, "unauthorized"); return result; }
Example 4
Source File: AdminMyControllerAdvice.java From ZTuoExchange_framework with MIT License | 5 votes |
@ResponseBody @ExceptionHandler({AuthenticationException.class,UnauthenticatedException.class}) public MessageResult handleAuthenticationError(AuthorizationException ex) { ex.printStackTrace(); MessageResult result = MessageResult.error(4000, "please login"); return result; }
Example 5
Source File: ShiroExceptionHandler.java From dts-shop with GNU Lesser General Public License v3.0 | 4 votes |
@ExceptionHandler(AuthorizationException.class) @ResponseBody public Object unauthorizedHandler(AuthorizationException e) { e.printStackTrace(); return ResponseUtil.unauthz(); }
Example 6
Source File: ShiroExceptionHandler.java From mall with MIT License | 4 votes |
@ExceptionHandler(AuthorizationException.class) @ResponseBody public Object unauthorizedHandler(AuthorizationException e) { e.printStackTrace(); return ResponseUtil.unauthz(); }