Skip to content

Commit

Permalink
refactor: 增加newInstanceNow方法
Browse files Browse the repository at this point in the history
  • Loading branch information
zhou-hao committed Dec 4, 2024
1 parent 2520842 commit 482f967
Showing 1 changed file with 11 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ public interface ReactiveRepository<T, K> {
*/
Mono<T> newInstance();

/**
* 创建实体类实例
*
* @return 实体类实例
*/
default T newInstanceNow() {
return newInstance()
.toFuture()
.getNow(null);
}

/**
* 根据异步ID查询
*
Expand Down

0 comments on commit 482f967

Please sign in to comment.