diff --git a/ruoyi-auth/src/main/resources/logback.xml b/ruoyi-auth/src/main/resources/logback.xml
index b27adc5d..098a610b 100644
--- a/ruoyi-auth/src/main/resources/logback.xml
+++ b/ruoyi-auth/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
- :ss} %-5level ${springAppName:-} %thread %logger %msg%n"/>
+
diff --git a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/PreAuthorizeAspect.java b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/PreAuthorizeAspect.java
index 64c9f17b..3a44d82b 100644
--- a/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/PreAuthorizeAspect.java
+++ b/ruoyi-common/ruoyi-common-security/src/main/java/com/ruoyi/common/security/aspect/PreAuthorizeAspect.java
@@ -35,6 +35,9 @@ public class PreAuthorizeAspect
/** 管理员角色权限标识 */
private static final String SUPER_ADMIN = "admin";
+ /** 数组为0时 */
+ private static final Integer ARRAY_EMPTY = 0;
+
@Around("@annotation(com.ruoyi.common.security.annotation.PreAuthorize)")
public Object around(ProceedingJoinPoint point) throws Throwable
{
@@ -63,7 +66,7 @@ public class PreAuthorizeAspect
}
throw new PreAuthorizeException();
}
- else if (!StringUtils.isEmpty(annotation.hasAnyPermi()))
+ else if (ARRAY_EMPTY < annotation.hasAnyPermi().length)
{
if (hasAnyPermi(annotation.hasAnyPermi()))
{
@@ -87,7 +90,7 @@ public class PreAuthorizeAspect
}
throw new PreAuthorizeException();
}
- else if (!StringUtils.isEmpty(annotation.hasAnyRoles()))
+ else if (ARRAY_EMPTY < annotation.hasAnyRoles().length)
{
if (hasAnyRoles(annotation.hasAnyRoles()))
{
@@ -165,7 +168,7 @@ public class PreAuthorizeAspect
}
for (String roleKey : userInfo.getRoles())
{
- if (SUPER_ADMIN.contains(roleKey) || roleKey.contains(role))
+ if (SUPER_ADMIN.equals(roleKey) || roleKey.equals(role))
{
return true;
}
diff --git a/ruoyi-gateway/src/main/resources/logback.xml b/ruoyi-gateway/src/main/resources/logback.xml
index e644524f..f8e7f8af 100644
--- a/ruoyi-gateway/src/main/resources/logback.xml
+++ b/ruoyi-gateway/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
- :ss} %-5level ${springAppName:-} %thread %logger %msg%n"/>
+
diff --git a/ruoyi-modules/ruoyi-gen/src/main/resources/logback.xml b/ruoyi-modules/ruoyi-gen/src/main/resources/logback.xml
index 098dca64..250c080f 100644
--- a/ruoyi-modules/ruoyi-gen/src/main/resources/logback.xml
+++ b/ruoyi-modules/ruoyi-gen/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
- :ss} %-5level ${springAppName:-} %thread %logger %msg%n"/>
+
diff --git a/ruoyi-modules/ruoyi-job/src/main/resources/logback.xml b/ruoyi-modules/ruoyi-job/src/main/resources/logback.xml
index 94a59638..5d7d3f50 100644
--- a/ruoyi-modules/ruoyi-job/src/main/resources/logback.xml
+++ b/ruoyi-modules/ruoyi-job/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
- :ss} %-5level ${springAppName:-} %thread %logger %msg%n"/>
+
diff --git a/ruoyi-modules/ruoyi-system/src/main/resources/logback.xml b/ruoyi-modules/ruoyi-system/src/main/resources/logback.xml
index 9c065a53..96bc0bbe 100644
--- a/ruoyi-modules/ruoyi-system/src/main/resources/logback.xml
+++ b/ruoyi-modules/ruoyi-system/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
- :ss} %-5level ${springAppName:-} %thread %logger %msg%n"/>
+
diff --git a/ruoyi-visual/ruoyi-monitor/src/main/resources/logback.xml b/ruoyi-visual/ruoyi-monitor/src/main/resources/logback.xml
index a287cda5..ab95c683 100644
--- a/ruoyi-visual/ruoyi-monitor/src/main/resources/logback.xml
+++ b/ruoyi-visual/ruoyi-monitor/src/main/resources/logback.xml
@@ -3,7 +3,7 @@
- :ss} %-5level ${springAppName:-} %thread %logger %msg%n"/>
+