package com.sunda.spmsweb.shiro;

import org.apache.shiro.authz.UnauthorizedException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestController;

import com.sunda.spmscommon.ResponseResult;

@ControllerAdvice
@RestController
public class GlobalExceptionHandler {
	
	@ExceptionHandler(UnauthorizedException.class)
	public ResponseResult handleException(UnauthorizedException e) {
		return ResponseResult.error("您没有接口访问权限，请联系管理员配置："+e);
	}
	
}
