feat(jwt): implement JWT-based authentication system
This commit is contained in:
@@ -4,4 +4,5 @@ import com.hanserwei.common.domain.dataobject.User;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
|
||||
public interface UserRepository extends JpaRepository<User, Long> {
|
||||
User getUsersByUsername(String username);
|
||||
}
|
||||
|
||||
@@ -13,6 +13,8 @@ public enum ResponseCodeEnum implements BaseExceptionInterface {
|
||||
PARAM_NOT_VALID("10001", "参数错误"),
|
||||
|
||||
// ----------- 业务异常状态码 -----------
|
||||
LOGIN_FAIL("20000", "登录失败"),
|
||||
USERNAME_OR_PWD_ERROR("20001", "用户名或密码错误"),
|
||||
;
|
||||
|
||||
// 异常码
|
||||
|
||||
Reference in New Issue
Block a user