mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-09-09 08:57:17 +08:00
refactor: 使用常量优化部分配置属性名
This commit is contained in:
@@ -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
|
||||
|
@@ -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 {
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user