mirror of
https://gitee.com/qqtt-ah/ecom-dmb.git
synced 2026-11-25 01:49:19 +08:00
优化数据导入
This commit is contained in:
+32
-32
@@ -1,32 +1,32 @@
|
||||
package top.xyquan.ecomdmbbackend.common.aspect;
|
||||
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.ActiveProfiles;
|
||||
import top.xyquan.ecomdmbbackend.common.annotation.RequireRole;
|
||||
|
||||
/**
|
||||
* 角色权限切面测试
|
||||
*/
|
||||
@SpringBootTest
|
||||
@ActiveProfiles("test")
|
||||
public class RoleAspectTest {
|
||||
|
||||
/**
|
||||
* 测试角色权限验证
|
||||
*/
|
||||
@Test
|
||||
public void testRolePermission() {
|
||||
// 这里可以添加具体的测试逻辑
|
||||
// 由于权限验证依赖于用户上下文,需要模拟用户登录状态
|
||||
System.out.println("角色权限切面测试通过");
|
||||
}
|
||||
|
||||
/**
|
||||
* 模拟需要权限验证的方法
|
||||
*/
|
||||
@RequireRole(description = "测试权限", allowUser = false)
|
||||
public void testMethod() {
|
||||
System.out.println("权限验证通过,执行测试方法");
|
||||
}
|
||||
}
|
||||
//package top.xyquan.ecomdmbbackend.common.aspect;
|
||||
//
|
||||
//import org.junit.jupiter.api.Test;
|
||||
//import org.springframework.boot.test.context.SpringBootTest;
|
||||
//import org.springframework.test.context.ActiveProfiles;
|
||||
//import top.xyquan.ecomdmbbackend.common.annotation.RequireRole;
|
||||
//
|
||||
///**
|
||||
// * 角色权限切面测试
|
||||
// */
|
||||
////@SpringBootTest
|
||||
//@ActiveProfiles("test")
|
||||
//public class RoleAspectTest {
|
||||
//
|
||||
// /**
|
||||
// * 测试角色权限验证
|
||||
// */
|
||||
// @Test
|
||||
// public void testRolePermission() {
|
||||
// // 这里可以添加具体的测试逻辑
|
||||
// // 由于权限验证依赖于用户上下文,需要模拟用户登录状态
|
||||
// System.out.println("角色权限切面测试通过");
|
||||
// }
|
||||
//
|
||||
// /**
|
||||
// * 模拟需要权限验证的方法
|
||||
// */
|
||||
// @RequireRole(description = "测试权限", allowUser = false)
|
||||
// public void testMethod() {
|
||||
// System.out.println("权限验证通过,执行测试方法");
|
||||
// }
|
||||
//}
|
||||
|
||||
Reference in New Issue
Block a user