From 20250681da7682de159b6259e80193b204e55047 Mon Sep 17 00:00:00 2001 From: Charles7c Date: Tue, 2 Jan 2024 22:14:00 +0800 Subject: [PATCH] =?UTF-8?q?refactor:=20=E4=BD=BF=E7=94=A8=E5=B8=B8?= =?UTF-8?q?=E9=87=8F=E4=BC=98=E5=8C=96=E9=83=A8=E5=88=86=E9=85=8D=E7=BD=AE?= =?UTF-8?q?=E5=B1=9E=E6=80=A7=E5=90=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../BehaviorCaptchaAutoConfiguration.java | 3 +- .../BehaviorCaptchaCacheConfiguration.java | 5 +- .../BehaviorCaptchaProperties.java | 3 +- .../GraphicCaptchaAutoConfiguration.java | 3 +- .../GraphicCaptchaProperties.java | 3 +- .../cors/CorsAutoConfiguration.java | 3 +- .../autoconfigure/cors/CorsProperties.java | 3 +- .../threadpool/AsyncAutoConfiguration.java | 3 +- .../ThreadPoolAutoConfiguration.java | 3 +- .../threadpool/ThreadPoolProperties.java | 3 +- .../core/constant/PropertiesConstants.java | 80 +++++++++++++++++++ .../ConditionalOnEnabledLog.java | 3 +- .../autoconfigure/LogProperties.java | 3 +- .../LocalStorageAutoConfiguration.java | 3 +- .../autoconfigure/LocalStorageProperties.java | 3 +- 15 files changed, 109 insertions(+), 15 deletions(-) create mode 100644 continew-starter-core/src/main/java/top/charles7c/continew/starter/core/constant/PropertiesConstants.java diff --git a/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaAutoConfiguration.java b/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaAutoConfiguration.java index aa59ef58..bb6fac1e 100644 --- a/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaAutoConfiguration.java +++ b/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaAutoConfiguration.java @@ -36,6 +36,7 @@ import org.springframework.context.annotation.Import; import org.springframework.core.io.Resource; import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import java.util.HashMap; import java.util.Map; @@ -50,7 +51,7 @@ import java.util.Properties; @Slf4j @AutoConfiguration @RequiredArgsConstructor -@ConditionalOnProperty(prefix = "continew-starter.captcha.behavior", name = "enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.CAPTCHA_BEHAVIOR, name = PropertiesConstants.ENABLED, havingValue = "true") @EnableConfigurationProperties(BehaviorCaptchaProperties.class) public class BehaviorCaptchaAutoConfiguration { diff --git a/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaCacheConfiguration.java b/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaCacheConfiguration.java index 23e22549..2fc127c7 100644 --- a/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaCacheConfiguration.java +++ b/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaCacheConfiguration.java @@ -33,6 +33,7 @@ import org.springframework.context.annotation.Bean; import top.charles7c.continew.starter.cache.redisson.autoconfigure.RedissonAutoConfiguration; import top.charles7c.continew.starter.captcha.behavior.enums.StorageType; import top.charles7c.continew.starter.captcha.behavior.impl.BehaviorCaptchaCacheServiceImpl; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; /** * 行为验证码缓存配置 @@ -49,7 +50,7 @@ abstract class BehaviorCaptchaCacheConfiguration { */ @ConditionalOnClass(RedisClient.class) @AutoConfigureBefore(RedissonAutoConfiguration.class) - @ConditionalOnProperty(name = "continew-starter.captcha.behavior.cache-type", havingValue = "redis") + @ConditionalOnProperty(name = PropertiesConstants.CAPTCHA_BEHAVIOR + ".cache-type", havingValue = "redis") static class Redis { static { CaptchaServiceFactory.cacheService.put(StorageType.REDIS.name().toLowerCase(), new BehaviorCaptchaCacheServiceImpl()); @@ -60,7 +61,7 @@ abstract class BehaviorCaptchaCacheConfiguration { /** * 自定义缓存实现类-自定义 */ - @ConditionalOnProperty(name = "continew-starter.captcha.behavior.cache-type", havingValue = "custom") + @ConditionalOnProperty(name = PropertiesConstants.CAPTCHA_BEHAVIOR + ".cache-type", havingValue = "custom") static class Custom { @Bean diff --git a/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaProperties.java b/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaProperties.java index 69e9a42b..168de6f3 100644 --- a/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaProperties.java +++ b/continew-starter-captcha/continew-starter-captcha-behavior/src/main/java/top/charles7c/continew/starter/captcha/behavior/autoconfigure/BehaviorCaptchaProperties.java @@ -21,6 +21,7 @@ import com.anji.captcha.service.CaptchaCacheService; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import top.charles7c.continew.starter.captcha.behavior.enums.StorageType; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import java.awt.*; @@ -31,7 +32,7 @@ import java.awt.*; * @since 1.1.0 */ @Data -@ConfigurationProperties(prefix = "continew-starter.captcha.behavior") +@ConfigurationProperties(PropertiesConstants.CAPTCHA_BEHAVIOR) public class BehaviorCaptchaProperties { /** diff --git a/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaAutoConfiguration.java b/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaAutoConfiguration.java index 621f6803..8d5972e0 100644 --- a/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaAutoConfiguration.java +++ b/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaAutoConfiguration.java @@ -21,6 +21,7 @@ import lombok.extern.slf4j.Slf4j; import org.springframework.boot.autoconfigure.AutoConfiguration; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.context.properties.EnableConfigurationProperties; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; /** * 图形验证码自动配置 @@ -31,7 +32,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties @Slf4j @AutoConfiguration @EnableConfigurationProperties(GraphicCaptchaProperties.class) -@ConditionalOnProperty(prefix = "continew-starter.captcha.graphic", name = "enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.CAPTCHA_GRAPHIC, name = PropertiesConstants.ENABLED, havingValue = "true") public class GraphicCaptchaAutoConfiguration { @PostConstruct diff --git a/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaProperties.java b/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaProperties.java index fd17ce1a..621a18b1 100644 --- a/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaProperties.java +++ b/continew-starter-captcha/continew-starter-captcha-graphic/src/main/java/top/charles7c/continew/starter/captcha/graphic/autoconfigure/GraphicCaptchaProperties.java @@ -22,6 +22,7 @@ import com.wf.captcha.base.Captcha; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import top.charles7c.continew.starter.captcha.graphic.enums.GraphicCaptchaType; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import java.awt.*; @@ -32,7 +33,7 @@ import java.awt.*; * @since 1.0.0 */ @Data -@ConfigurationProperties(prefix = "continew-starter.captcha.graphic") +@ConfigurationProperties(PropertiesConstants.CAPTCHA_GRAPHIC) public class GraphicCaptchaProperties { /** diff --git a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsAutoConfiguration.java b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsAutoConfiguration.java index 4ecacd79..d4a5fb13 100644 --- a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsAutoConfiguration.java +++ b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsAutoConfiguration.java @@ -27,6 +27,7 @@ import org.springframework.context.annotation.Lazy; import org.springframework.web.cors.CorsConfiguration; import org.springframework.web.cors.UrlBasedCorsConfigurationSource; import org.springframework.web.filter.CorsFilter; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import top.charles7c.continew.starter.core.constant.StringConstants; /** @@ -39,7 +40,7 @@ import top.charles7c.continew.starter.core.constant.StringConstants; @Lazy @AutoConfiguration @ConditionalOnWebApplication -@ConditionalOnProperty(prefix = "continew-starter.cors", name = "enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.CORS, name = PropertiesConstants.ENABLED, havingValue = "true") @EnableConfigurationProperties(CorsProperties.class) public class CorsAutoConfiguration { diff --git a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsProperties.java b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsProperties.java index 74ea4869..9350abd7 100644 --- a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsProperties.java +++ b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/cors/CorsProperties.java @@ -18,6 +18,7 @@ package top.charles7c.continew.starter.core.autoconfigure.cors; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import top.charles7c.continew.starter.core.constant.StringConstants; import java.util.ArrayList; @@ -31,7 +32,7 @@ import java.util.List; * @since 1.0.0 */ @Data -@ConfigurationProperties(prefix = "continew-starter.cors") +@ConfigurationProperties(PropertiesConstants.CORS) public class CorsProperties { /** diff --git a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/AsyncAutoConfiguration.java b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/AsyncAutoConfiguration.java index 08f12a92..7b28dbb5 100644 --- a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/AsyncAutoConfiguration.java +++ b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/AsyncAutoConfiguration.java @@ -25,6 +25,7 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import top.charles7c.continew.starter.core.exception.BaseException; import java.util.Arrays; @@ -42,7 +43,7 @@ import java.util.concurrent.ScheduledExecutorService; @Lazy @AutoConfiguration @RequiredArgsConstructor -@ConditionalOnProperty(prefix = "continew-starter.thread-pool", name = "enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.THREAD_POOL, name = PropertiesConstants.ENABLED, havingValue = "true") @EnableAsync(proxyTargetClass = true) public class AsyncAutoConfiguration implements AsyncConfigurer { diff --git a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolAutoConfiguration.java b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolAutoConfiguration.java index e88a4e5f..1070ae92 100644 --- a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolAutoConfiguration.java +++ b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolAutoConfiguration.java @@ -26,6 +26,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Lazy; import org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import top.charles7c.continew.starter.core.util.ExceptionUtils; import java.util.concurrent.ScheduledExecutorService; @@ -42,7 +43,7 @@ import java.util.concurrent.ThreadPoolExecutor; @Slf4j @Lazy @AutoConfiguration -@ConditionalOnProperty(prefix = "continew-starter.thread-pool", name = "enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.THREAD_POOL, name = PropertiesConstants.ENABLED, havingValue = "true") @EnableConfigurationProperties(ThreadPoolProperties.class) public class ThreadPoolAutoConfiguration { diff --git a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolProperties.java b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolProperties.java index 557cb682..0136949b 100644 --- a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolProperties.java +++ b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/autoconfigure/threadpool/ThreadPoolProperties.java @@ -18,6 +18,7 @@ package top.charles7c.continew.starter.core.autoconfigure.threadpool; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; /** * 线程池配置属性 @@ -27,7 +28,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; * @since 1.0.0 */ @Data -@ConfigurationProperties(prefix = "continew-starter.thread-pool") +@ConfigurationProperties(PropertiesConstants.THREAD_POOL) public class ThreadPoolProperties { /** diff --git a/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/constant/PropertiesConstants.java b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/constant/PropertiesConstants.java new file mode 100644 index 00000000..dfbd974f --- /dev/null +++ b/continew-starter-core/src/main/java/top/charles7c/continew/starter/core/constant/PropertiesConstants.java @@ -0,0 +1,80 @@ +/* + * Copyright (c) 2022-present Charles7c Authors. All Rights Reserved. + *

+ * Licensed under the GNU LESSER GENERAL PUBLIC LICENSE 3.0; + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + *

+ * http://www.gnu.org/licenses/lgpl.html + *

+ * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package top.charles7c.continew.starter.core.constant; + +import lombok.AccessLevel; +import lombok.NoArgsConstructor; + +/** + * 配置属性相关常量 + * + * @author Charles7c + * @since 1.1.1 + */ +@NoArgsConstructor(access = AccessLevel.PRIVATE) +public class PropertiesConstants { + + /** + * ContiNew Starter + */ + public static final String CONTINEW_STARTER = "continew-starter"; + + /** + * 启用配置 + */ + public static final String ENABLED = "enabled"; + + /** + * 跨域配置 + */ + public static final String CORS = CONTINEW_STARTER + ".cors"; + + /** + * 线程池配置 + */ + public static final String THREAD_POOL = CONTINEW_STARTER + ".thread-pool"; + + /** + * 日志配置 + */ + public static final String LOG = CONTINEW_STARTER + ".log"; + + /** + * 存储配置 + */ + public static final String STORAGE = CONTINEW_STARTER + ".storage"; + + /** + * 本地存储配置 + */ + public static final String STORAGE_LOCAL = STORAGE + ".local"; + + /** + * 验证码配置 + */ + public static final String CAPTCHA = CONTINEW_STARTER + ".captcha"; + + /** + * 图形验证码配置 + */ + public static final String CAPTCHA_GRAPHIC = CAPTCHA + ".graphic"; + + /** + * 行为验证码配置 + */ + public static final String CAPTCHA_BEHAVIOR = CAPTCHA + ".behavior"; +} 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 8ce8887f..af89eaea 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 @@ -17,6 +17,7 @@ package top.charles7c.continew.starter.log.httptracepro.autoconfigure; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import java.lang.annotation.*; @@ -29,5 +30,5 @@ import java.lang.annotation.*; @Retention(RetentionPolicy.RUNTIME) @Target({ ElementType.TYPE, ElementType.METHOD }) @Documented -@ConditionalOnProperty(prefix = "continew-starter.log", name = "enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.LOG, name = PropertiesConstants.ENABLED, havingValue = "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 eca496a9..39fa6186 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 @@ -18,6 +18,7 @@ package top.charles7c.continew.starter.log.httptracepro.autoconfigure; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import top.charles7c.continew.starter.log.common.enums.Include; import java.util.HashSet; @@ -30,7 +31,7 @@ import java.util.Set; * @since 1.1.0 */ @Data -@ConfigurationProperties(prefix = "continew-starter.log") +@ConfigurationProperties(PropertiesConstants.LOG) public class LogProperties { /** diff --git a/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageAutoConfiguration.java b/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageAutoConfiguration.java index 287b24d3..142458b7 100644 --- a/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageAutoConfiguration.java +++ b/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageAutoConfiguration.java @@ -26,6 +26,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import top.charles7c.continew.starter.core.constant.StringConstants; import java.util.Map; @@ -42,7 +43,7 @@ import java.util.Map; @AutoConfiguration @RequiredArgsConstructor @EnableConfigurationProperties(LocalStorageProperties.class) -@ConditionalOnProperty(name = "continew-starter.storage.local.enabled", havingValue = "true") +@ConditionalOnProperty(prefix = PropertiesConstants.STORAGE_LOCAL, name = PropertiesConstants.ENABLED, havingValue = "true") public class LocalStorageAutoConfiguration implements WebMvcConfigurer { private final LocalStorageProperties properties; diff --git a/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageProperties.java b/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageProperties.java index 00367e7c..b71c2ce3 100644 --- a/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageProperties.java +++ b/continew-starter-storage/continew-starter-storage-local/src/main/java/top/charles7c/continew/starter/storage/local/autoconfigure/LocalStorageProperties.java @@ -19,6 +19,7 @@ package top.charles7c.continew.starter.storage.local.autoconfigure; import lombok.Data; import org.springframework.boot.context.properties.ConfigurationProperties; import org.springframework.util.unit.DataSize; +import top.charles7c.continew.starter.core.constant.PropertiesConstants; import java.util.HashMap; import java.util.Map; @@ -30,7 +31,7 @@ import java.util.Map; * @since 1.1.0 */ @Data -@ConfigurationProperties(prefix = "continew-starter.storage.local") +@ConfigurationProperties(PropertiesConstants.STORAGE_LOCAL) public class LocalStorageProperties { /**