refactor: 使用常量优化部分配置属性名

This commit is contained in:
2024-01-02 22:14:00 +08:00
parent 1f3687df6f
commit 20250681da
15 changed files with 109 additions and 15 deletions

View File

@@ -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 {}

View File

@@ -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 {
/**