mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 11:51:55 +08:00
增加 @NoSensitive 注解
- 在 SysUser 实体类中为手机号码字段添加 @Sensitive 注解 - 新增 @NoSensitive 注解和相关切面、拦截器,用于 “关闭” 数据脱敏 - 在用户信息相关接口中添加 @NoSensitive 注解,以 “关闭” 数据脱敏 - 新增 WebMvcConfig 配置类,注册 NoSensitiveInterceptor 拦截器
This commit is contained in:
@@ -22,7 +22,12 @@
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
<!-- RuoYi Common Sensitive -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-sensitive</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
</project>
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.api;
|
||||
|
||||
import com.ruoyi.common.core.annotation.NoSensitive;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
@@ -16,6 +17,7 @@ import com.ruoyi.system.api.factory.RemoteLogFallbackFactory;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@NoSensitive
|
||||
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteLogFallbackFactory.class)
|
||||
public interface RemoteLogService
|
||||
{
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.ruoyi.system.api;
|
||||
|
||||
import com.ruoyi.common.core.annotation.NoSensitive;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
@@ -19,6 +20,7 @@ import com.ruoyi.system.api.model.LoginUser;
|
||||
*
|
||||
* @author ruoyi
|
||||
*/
|
||||
@NoSensitive
|
||||
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.SYSTEM_SERVICE, fallbackFactory = RemoteUserFallbackFactory.class)
|
||||
public interface RemoteUserService
|
||||
{
|
||||
|
||||
@@ -3,6 +3,10 @@ package com.ruoyi.system.api.domain;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import javax.validation.constraints.*;
|
||||
|
||||
import com.ruoyi.common.core.annotation.NoSensitive;
|
||||
import com.ruoyi.common.sensitive.annotation.Sensitive;
|
||||
import com.ruoyi.common.sensitive.enums.DesensitizedType;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
import com.ruoyi.common.core.annotation.Excel;
|
||||
@@ -44,6 +48,7 @@ public class SysUser extends BaseEntity
|
||||
|
||||
/** 手机号码 */
|
||||
@Excel(name = "手机号码", cellType = ColumnType.TEXT)
|
||||
@Sensitive(desensitizedType = DesensitizedType.PHONE)
|
||||
private String phonenumber;
|
||||
|
||||
/** 用户性别 */
|
||||
|
||||
Reference in New Issue
Block a user