Browse Source

用户信息参数返回忽略掉密码字段

RuoYi 4 years ago
parent
commit
03c952d819
1 changed files with 2 additions and 0 deletions
  1. 2 0
      ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java

+ 2 - 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/SysUser.java

@@ -5,6 +5,7 @@ import java.util.List;
 import javax.validation.constraints.*;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
+import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.ruoyi.common.annotation.Excel;
 import com.ruoyi.common.annotation.Excel.ColumnType;
 import com.ruoyi.common.annotation.Excel.Type;
@@ -232,6 +233,7 @@ public class SysUser extends BaseEntity
         this.avatar = avatar;
     }
 
+    @JsonIgnore
     public String getPassword()
     {
         return password;