fix: 修复SecurityConfig环境判断,支持h2-test配置
This commit is contained in:
+1
-1
@@ -36,7 +36,7 @@ public class SecurityConfig {
|
|||||||
final boolean isDevOrTest;
|
final boolean isDevOrTest;
|
||||||
|
|
||||||
isDevOrTest = java.util.Arrays.stream(activeProfiles)
|
isDevOrTest = java.util.Arrays.stream(activeProfiles)
|
||||||
.anyMatch(profile -> "dev".equals(profile) || "test".equals(profile));
|
.anyMatch(profile -> "dev".equals(profile) || "test".equals(profile) || "h2-test".equals(profile));
|
||||||
|
|
||||||
logger.info("SecurityConfig初始化: 当前环境={}, Swagger启用状态={}",
|
logger.info("SecurityConfig初始化: 当前环境={}, Swagger启用状态={}",
|
||||||
activeProfiles.length > 0 ? String.join(",", activeProfiles) : "default", isDevOrTest);
|
activeProfiles.length > 0 ? String.join(",", activeProfiles) : "default", isDevOrTest);
|
||||||
|
|||||||
Reference in New Issue
Block a user