init_object,增加了不完全的登录API,完善数据库设计
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
package com.guo.learningprogresstracker.exception;
|
||||
/**
|
||||
* 应用程序异常
|
||||
*
|
||||
* 数据库连接失败等潜在异常
|
||||
* */
|
||||
public class AppException extends Exception{
|
||||
// 应用程序异常类
|
||||
public AppException(String message){
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.guo.learningprogresstracker.exception;
|
||||
|
||||
/**
|
||||
* 参数错误
|
||||
*
|
||||
* 数据不合法时抛出此错误
|
||||
* 此错误由GlobalExceptionHandler类统一处理
|
||||
* */
|
||||
public class ErrorParameterException extends Exception {
|
||||
public ErrorParameterException(String message){
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.guo.learningprogresstracker.exception;
|
||||
|
||||
/**
|
||||
* 没有发现实体错误
|
||||
*
|
||||
* 当查询一个或多个实体时没有返回值时抛出此错误
|
||||
* (你需要查询一个实体,而非模糊查询, 理应提供已存在的实体id
|
||||
* 但服务器却没找到,既无法理解请求的操作,进而返回code:400)
|
||||
*
|
||||
* 响应code为404
|
||||
* */
|
||||
public class NotFindEntitiesException extends Exception {
|
||||
public NotFindEntitiesException(String message){
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.guo.learningprogresstracker.exception;
|
||||
|
||||
/**
|
||||
* 操作失败异常
|
||||
*
|
||||
* 当查询失败或者增删改的时候返回false
|
||||
* 响应code为404
|
||||
* */
|
||||
public class OperationFailedException extends Exception{
|
||||
public OperationFailedException(){}
|
||||
public OperationFailedException(String message){
|
||||
super(message);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user