feat:增加controller层的异常处理
This commit is contained in:
23
src/main/java/com/dpkj/common/exception/ErrorInterface.java
Normal file
23
src/main/java/com/dpkj/common/exception/ErrorInterface.java
Normal file
@@ -0,0 +1,23 @@
|
||||
package com.dpkj.common.exception;
|
||||
|
||||
/**
|
||||
* 错误枚举接口,所有的错误枚举都需要实现该接口,如果需要自定义
|
||||
* 错误信息,可通过实现该接口与RespBean进行使用
|
||||
*
|
||||
* @author <a href="https://gitee.com/shi-chongli">石头人</a>
|
||||
* @see com.dpkj.common.vo.Result
|
||||
* @since 2023-07-27 13:05:00
|
||||
*/
|
||||
public interface ErrorInterface {
|
||||
|
||||
/**
|
||||
* 获取响应码
|
||||
*/
|
||||
int getCode();
|
||||
|
||||
/**
|
||||
* 获取响应信息
|
||||
*/
|
||||
String getMessage();
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user