初始化项目

This commit is contained in:
ah--desktop
2025-09-10 00:33:25 +08:00
commit a305dcdc3f
1406 changed files with 114976 additions and 0 deletions
@@ -0,0 +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("权限验证通过,执行测试方法");
}
}