From 2aea8ba8318dded142a274221af7de2b62d4ced9 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Sun, 4 Feb 2024 23:16:06 +0800 Subject: [PATCH] =?UTF-8?q?refactor(log):=20=E9=BB=98=E8=AE=A4=E5=90=AF?= =?UTF-8?q?=E7=94=A8=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../log/httptracepro/autoconfigure/ConditionalOnEnabledLog.java | 2 +- .../starter/log/httptracepro/autoconfigure/LogProperties.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/ConditionalOnEnabledLog.java b/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/ConditionalOnEnabledLog.java index af9e8d7b..cdda05f8 100644 --- a/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/ConditionalOnEnabledLog.java +++ b/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/ConditionalOnEnabledLog.java @@ -30,6 +30,6 @@ import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @Target({ElementType.TYPE, ElementType.METHOD}) @Documented -@ConditionalOnProperty(prefix = PropertiesConstants.LOG, name = PropertiesConstants.ENABLED, havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.LOG, name = PropertiesConstants.ENABLED, havingValue = "true", matchIfMissing = true) public @interface ConditionalOnEnabledLog { } \ No newline at end of file diff --git a/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/LogProperties.java b/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/LogProperties.java index 538b6d10..9fe7dfee 100644 --- a/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/LogProperties.java +++ b/continew-starter-log/continew-starter-log-httptrace-pro/src/main/java/top/charles7c/continew/starter/log/httptracepro/autoconfigure/LogProperties.java @@ -35,7 +35,7 @@ public class LogProperties { /** * 是否启用日志 */ - private boolean enabled = false; + private boolean enabled = true; /** * 是否打印日志,开启后可打印访问日志(类似于 Nginx access log)