[SysUser] 返回给前端数据的时候,隐藏密码和加盐,防止别人猜测加密方式 或者 暴力破击

pull/91/head
duandazhi 3 years ago
parent 7e72849d05
commit 4e0301a7b2

@ -5,6 +5,8 @@ import java.util.List;
import javax.validation.constraints.Email; import javax.validation.constraints.Email;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Size; import javax.validation.constraints.Size;
import com.fasterxml.jackson.annotation.JsonIgnore;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import com.fasterxml.jackson.annotation.JsonProperty; import com.fasterxml.jackson.annotation.JsonProperty;
@ -55,9 +57,11 @@ public class SysUser extends BaseEntity
private String avatar; private String avatar;
/** 密码 */ /** 密码 */
@JsonIgnore
private String password; private String password;
/** 盐加密 */ /** 盐加密 */
@JsonIgnore
private String salt; private String salt;
/** 帐号状态0正常 1停用 */ /** 帐号状态0正常 1停用 */

Loading…
Cancel
Save