package com.pj.sso;

import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

import com.pj.util.AjaxJson;

/**
 * 全局异常处理 
 * @author kong
 *
 */
@RestControllerAdvice
public class HandlerException {

	// 全局异常拦截 
	@ExceptionHandler
	public AjaxJson handlerException(Exception e) {
		e.printStackTrace(); 
		return AjaxJson.getError(e.getMessage());
	}
	
}
