From 3a30a2a34c25812125e4e17864b6e3ee5fed861a Mon Sep 17 00:00:00 2001 From: weihongyang <1075331873@qq.com> Date: Wed, 22 Jun 2022 09:58:10 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E6=94=B9sercurity=E7=9A=84User?= =?UTF-8?q?DetailsService=E7=9A=84=E5=AE=9E=E7=8E=B0=E7=B1=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/cnbm/admin/service/impl/UserDetailsServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java b/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java index dcee45d..389c4c9 100644 --- a/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java +++ b/ym-admin/src/main/java/com/cnbm/admin/service/impl/UserDetailsServiceImpl.java @@ -7,6 +7,7 @@ import com.cnbm.admin.dto.SysUserDTO; import com.cnbm.admin.entity.LoginUser; import com.cnbm.admin.entity.SysMenuEntity; import com.cnbm.admin.entity.SysUserEntity; +import com.cnbm.admin.exception.LoginStatusException; import com.cnbm.admin.service.SysMenuService; import com.cnbm.common.utils.ConvertUtils; import lombok.extern.log4j.Log4j2; @@ -48,7 +49,7 @@ public class UserDetailsServiceImpl implements UserDetailsService { throw new UsernameNotFoundException("用户名不存在"); } if (sysUserEntity.getStatus() == 0) { - throw new DisabledException("该账户已被禁用,请联系管理员"); + throw new LoginStatusException("该账户已被禁用,请联系管理员"); } log.info("sysUserEntity的值是"+sysUserEntity.toString()); log.info("sysUserEntity.getSuperAdmin()=="+sysUserEntity.getSuperAdmin());