mirror of
https://gitee.com/y_project/RuoYi-Cloud.git
synced 2026-01-26 19:51:56 +08:00
Pre Merge pull request !421 from AhYi/master
This commit is contained in:
@@ -71,6 +71,11 @@
|
||||
<artifactId>ruoyi-common-swagger</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- RuoYi Common Sensitive -->
|
||||
<dependency>
|
||||
<groupId>com.ruoyi</groupId>
|
||||
<artifactId>ruoyi-common-sensitive</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.ruoyi.system;
|
||||
|
||||
import com.ruoyi.common.security.interceptor.NoSensitiveInterceptor;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
/**
|
||||
* @Description WebMvcConfig
|
||||
* @Author AhYi
|
||||
* @Date 2025-07-07 10:46
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
public class WebMvcConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addInterceptors(InterceptorRegistry registry) {
|
||||
registry.addInterceptor(new NoSensitiveInterceptor())
|
||||
.addPathPatterns("/**")
|
||||
.order(-1);
|
||||
}
|
||||
}
|
||||
@@ -2,6 +2,8 @@ package com.ruoyi.system.controller;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Map;
|
||||
|
||||
import com.ruoyi.common.core.annotation.NoSensitive;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
@@ -49,6 +51,7 @@ public class SysProfileController extends BaseController
|
||||
/**
|
||||
* 个人信息
|
||||
*/
|
||||
@NoSensitive
|
||||
@GetMapping
|
||||
public AjaxResult profile()
|
||||
{
|
||||
|
||||
@@ -6,6 +6,8 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.ruoyi.common.core.annotation.NoSensitive;
|
||||
import org.apache.commons.lang3.ArrayUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
@@ -117,6 +119,7 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 获取当前用户信息
|
||||
*/
|
||||
@NoSensitive
|
||||
@InnerAuth
|
||||
@GetMapping("/info/{username}")
|
||||
public R<LoginUser> info(@PathVariable("username") String username)
|
||||
@@ -171,6 +174,7 @@ public class SysUserController extends BaseController
|
||||
*
|
||||
* @return 用户信息
|
||||
*/
|
||||
@NoSensitive
|
||||
@GetMapping("getInfo")
|
||||
public AjaxResult getInfo()
|
||||
{
|
||||
@@ -221,6 +225,7 @@ public class SysUserController extends BaseController
|
||||
/**
|
||||
* 根据用户编号获取详细信息
|
||||
*/
|
||||
@NoSensitive
|
||||
@RequiresPermissions("system:user:query")
|
||||
@GetMapping(value = { "/", "/{userId}" })
|
||||
public AjaxResult getInfo(@PathVariable(value = "userId", required = false) Long userId)
|
||||
|
||||
Reference in New Issue
Block a user