service common
This commit is contained in:
@@ -0,0 +1,75 @@
|
||||
package org.xyzh.common.exception;
|
||||
|
||||
/**
|
||||
* @description BaseException.java文件描述 基础异常类
|
||||
* @filename BaseException.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public class BaseException extends RuntimeException{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* @description code
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
private String code;
|
||||
|
||||
/**
|
||||
* @description BaseException
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public BaseException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description BaseException
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public BaseException(String code, String message) {
|
||||
super(message);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description BaseException
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public BaseException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
/**
|
||||
* @description BaseException
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public BaseException(String code, String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description getCode
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public String getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
/**
|
||||
* @description setCode
|
||||
* @author yslg
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public void setCode(String code) {
|
||||
this.code = code;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
package org.xyzh.common.exception.auth;
|
||||
|
||||
import org.xyzh.common.exception.BaseException;
|
||||
|
||||
/**
|
||||
* @description AuthException.java文件描述 认证异常类
|
||||
* @filename AuthException.java
|
||||
* @author yslg
|
||||
* @copyright xyzh
|
||||
* @since 2025-09-28
|
||||
*/
|
||||
public class AuthException extends BaseException {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public AuthException(String message) {
|
||||
super(message);
|
||||
}
|
||||
|
||||
public AuthException(String code, String message) {
|
||||
super(code, message);
|
||||
}
|
||||
|
||||
public AuthException(String message, Throwable cause) {
|
||||
super(message, cause);
|
||||
}
|
||||
|
||||
public AuthException(String code, String message, Throwable cause) {
|
||||
super(code, message, cause);
|
||||
}
|
||||
|
||||
public String getCode() {
|
||||
return super.getCode();
|
||||
}
|
||||
|
||||
public void setCode(String code) {
|
||||
super.setCode(code);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user