feat:仓库初始化问题修复
This commit is contained in:
parent
b5884b4b86
commit
95a35c35b9
@ -1,14 +0,0 @@
|
|||||||
package com.flyfish.framework.repository;
|
|
||||||
|
|
||||||
import com.flyfish.framework.domain.po.User;
|
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 异步用户仓库
|
|
||||||
*
|
|
||||||
* @author wybab
|
|
||||||
*/
|
|
||||||
public interface ReactiveUserRepository extends DefaultReactiveRepository<User> {
|
|
||||||
|
|
||||||
Mono<User> findByUsername(String username);
|
|
||||||
}
|
|
@ -1,15 +1,14 @@
|
|||||||
package com.flyfish.framework.repository;
|
package com.flyfish.framework.repository;
|
||||||
|
|
||||||
import com.flyfish.framework.domain.po.User;
|
import com.flyfish.framework.domain.po.User;
|
||||||
|
import reactor.core.publisher.Mono;
|
||||||
import java.util.Optional;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 用户repo
|
* 异步用户仓库
|
||||||
*
|
*
|
||||||
* @author wangyu
|
* @author wybab
|
||||||
*/
|
*/
|
||||||
public interface UserRepository extends DefaultRepository<User> {
|
public interface UserRepository extends DefaultReactiveRepository<User> {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户名密码查询用户
|
* 通过用户名密码查询用户
|
||||||
@ -18,7 +17,7 @@ public interface UserRepository extends DefaultRepository<User> {
|
|||||||
* @param password 密码
|
* @param password 密码
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
Optional<User> findByUsernameAndPassword(String username, String password);
|
Mono<User> findByUsernameAndPassword(String username, String password);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 通过用户名查询
|
* 通过用户名查询
|
||||||
@ -26,5 +25,5 @@ public interface UserRepository extends DefaultRepository<User> {
|
|||||||
* @param username 用户名
|
* @param username 用户名
|
||||||
* @return 结果
|
* @return 结果
|
||||||
*/
|
*/
|
||||||
Optional<User> findByUsername(String username);
|
Mono<User> findByUsername(String username);
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
package com.flyfish.framework.service;
|
package com.flyfish.framework.service;
|
||||||
|
|
||||||
import com.flyfish.framework.domain.po.User;
|
import com.flyfish.framework.domain.po.User;
|
||||||
import com.flyfish.framework.repository.ReactiveUserRepository;
|
import com.flyfish.framework.repository.UserRepository;
|
||||||
import com.flyfish.framework.service.impl.BaseReactiveServiceImpl;
|
import com.flyfish.framework.service.impl.BaseReactiveServiceImpl;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import reactor.core.publisher.Mono;
|
import reactor.core.publisher.Mono;
|
||||||
@ -22,7 +22,7 @@ public class UserService extends BaseReactiveServiceImpl<User> implements UserFi
|
|||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Mono<User> findByUsername(String username) {
|
public Mono<User> findByUsername(String username) {
|
||||||
return ((ReactiveUserRepository) repository).findByUsername(username);
|
return ((UserRepository) repository).findByUsername(username);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user