将 find 方法的返回值改为 Optional<T>。

This commit is contained in:
2023-02-16 15:42:30 +08:00
parent 02d918d0a4
commit bac7a007e6
16 changed files with 77 additions and 63 deletions

View File

@@ -6,12 +6,7 @@ import org.springframework.web.bind.annotation.ResponseStatus;
/**
* 需要时,当查询数据不存在时抛出的异常
*
* <p>
* 暂时先这样,后续完善异常体系时可能会更改。
* </p>
*
* @author <a href="https://gitee.com/zhouxy108">ZhouXY</a>
* @see xyz.zhouxy.plusone.util.AssertResult
*/
@ResponseStatus(HttpStatus.NOT_FOUND)
public class DataNotExistException extends PlusoneException {