Spring Boot HTTP over JSON 的错误码异常处理

This commit is contained in:
JeffLi1993
2017-03-14 11:52:14 +08:00
committed by liqiangqiang
parent 5346d02ac2
commit 07ffcd1a4d
6 changed files with 17 additions and 7 deletions

View File

@@ -1,8 +1,8 @@
package org.spring.springboot.result;
import org.spring.springboot.result.base.ErrorInfoInterface;
/**
* 统一错误码异常
*
* Created by bysocket on 14/03/2017.
*/
public class GlobalErrorInfoException extends Exception {

View File

@@ -1,12 +1,13 @@
package org.spring.springboot.result;
import org.spring.springboot.result.base.ErrorInfoInterface;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;
import javax.servlet.http.HttpServletRequest;
/**
* 统一错误码异常处理
*
* Created by bysocket on 14/03/2017.
*/
@RestControllerAdvice

View File

@@ -1,8 +1,8 @@
package org.spring.springboot.result;
import org.spring.springboot.result.base.ErrorInfoInterface;
/**
* 返回体
*
* Created by bysocket on 14/03/2017.
*/
public class ResultBody<T> {