mirror of
				https://github.com/continew-org/continew-starter.git
				synced 2025-10-31 10:57:15 +08:00 
			
		
		
		
	chore: 移除 lombok 依赖
再度精简依赖
This commit is contained in:
		| @@ -24,8 +24,8 @@ import com.anji.captcha.service.CaptchaService; | ||||
| import com.anji.captcha.service.impl.CaptchaServiceFactory; | ||||
| import com.anji.captcha.util.ImageUtils; | ||||
| import jakarta.annotation.PostConstruct; | ||||
| import lombok.RequiredArgsConstructor; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springframework.boot.autoconfigure.AutoConfiguration; | ||||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; | ||||
| @@ -48,15 +48,18 @@ import java.util.Properties; | ||||
|  * @author Bull-BCLS | ||||
|  * @since 1.1.0 | ||||
|  */ | ||||
| @Slf4j | ||||
| @AutoConfiguration | ||||
| @RequiredArgsConstructor | ||||
| @ConditionalOnProperty(prefix = PropertiesConstants.CAPTCHA_BEHAVIOR, name = PropertiesConstants.ENABLED, havingValue = "true") | ||||
| @EnableConfigurationProperties(BehaviorCaptchaProperties.class) | ||||
| public class BehaviorCaptchaAutoConfiguration { | ||||
|  | ||||
|     private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaAutoConfiguration.class); | ||||
|     private final BehaviorCaptchaProperties properties; | ||||
|  | ||||
|     public BehaviorCaptchaAutoConfiguration(BehaviorCaptchaProperties properties) { | ||||
|         this.properties = properties; | ||||
|     } | ||||
|  | ||||
|     /** | ||||
|      * 自定义缓存实现配置 | ||||
|      */ | ||||
|   | ||||
| @@ -21,8 +21,9 @@ import cn.hutool.extra.spring.SpringUtil; | ||||
| import com.anji.captcha.service.CaptchaCacheService; | ||||
| import com.anji.captcha.service.impl.CaptchaServiceFactory; | ||||
| import jakarta.annotation.PostConstruct; | ||||
| import lombok.extern.slf4j.Slf4j; | ||||
| import org.redisson.client.RedisClient; | ||||
| import org.slf4j.Logger; | ||||
| import org.slf4j.LoggerFactory; | ||||
| import org.springframework.boot.autoconfigure.AutoConfigureBefore; | ||||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; | ||||
| import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; | ||||
| @@ -39,9 +40,10 @@ import top.charles7c.continew.starter.core.constant.PropertiesConstants; | ||||
|  * @author Bull-BCLS | ||||
|  * @since 1.1.0 | ||||
|  */ | ||||
| @Slf4j | ||||
| abstract class BehaviorCaptchaCacheConfiguration { | ||||
|  | ||||
|     private static final Logger log = LoggerFactory.getLogger(BehaviorCaptchaCacheConfiguration.class); | ||||
|  | ||||
|     private BehaviorCaptchaCacheConfiguration() { | ||||
|     } | ||||
|  | ||||
|   | ||||
| @@ -18,7 +18,6 @@ package top.charles7c.continew.starter.captcha.behavior.autoconfigure; | ||||
|  | ||||
| import com.anji.captcha.model.common.CaptchaTypeEnum; | ||||
| 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; | ||||
| @@ -31,7 +30,6 @@ import java.awt.*; | ||||
|  * @author Bull-BCLS | ||||
|  * @since 1.1.0 | ||||
|  */ | ||||
| @Data | ||||
| @ConfigurationProperties(PropertiesConstants.CAPTCHA_BEHAVIOR) | ||||
| public class BehaviorCaptchaProperties { | ||||
|  | ||||
| @@ -149,4 +147,193 @@ public class BehaviorCaptchaProperties { | ||||
|      * 点选字体大小(默认:25) | ||||
|      */ | ||||
|     private int fontSize = 25; | ||||
|  | ||||
|     public boolean isEnabled() { | ||||
|         return enabled; | ||||
|     } | ||||
|  | ||||
|     public void setEnabled(boolean enabled) { | ||||
|         this.enabled = enabled; | ||||
|     } | ||||
|  | ||||
|     public Boolean getEnableAes() { | ||||
|         return enableAes; | ||||
|     } | ||||
|  | ||||
|     public void setEnableAes(Boolean enableAes) { | ||||
|         this.enableAes = enableAes; | ||||
|     } | ||||
|  | ||||
|     public CaptchaTypeEnum getType() { | ||||
|         return type; | ||||
|     } | ||||
|  | ||||
|     public void setType(CaptchaTypeEnum type) { | ||||
|         this.type = type; | ||||
|     } | ||||
|  | ||||
|     public StorageType getCacheType() { | ||||
|         return cacheType; | ||||
|     } | ||||
|  | ||||
|     public void setCacheType(StorageType cacheType) { | ||||
|         this.cacheType = cacheType; | ||||
|     } | ||||
|  | ||||
|     public Class<? extends CaptchaCacheService> getCacheImpl() { | ||||
|         return cacheImpl; | ||||
|     } | ||||
|  | ||||
|     public void setCacheImpl(Class<? extends CaptchaCacheService> cacheImpl) { | ||||
|         this.cacheImpl = cacheImpl; | ||||
|     } | ||||
|  | ||||
|     public String getJigsawBaseMapPath() { | ||||
|         return jigsawBaseMapPath; | ||||
|     } | ||||
|  | ||||
|     public void setJigsawBaseMapPath(String jigsawBaseMapPath) { | ||||
|         this.jigsawBaseMapPath = jigsawBaseMapPath; | ||||
|     } | ||||
|  | ||||
|     public String getSlipOffset() { | ||||
|         return slipOffset; | ||||
|     } | ||||
|  | ||||
|     public void setSlipOffset(String slipOffset) { | ||||
|         this.slipOffset = slipOffset; | ||||
|     } | ||||
|  | ||||
|     public String getPicClickBaseMapPath() { | ||||
|         return picClickBaseMapPath; | ||||
|     } | ||||
|  | ||||
|     public void setPicClickBaseMapPath(String picClickBaseMapPath) { | ||||
|         this.picClickBaseMapPath = picClickBaseMapPath; | ||||
|     } | ||||
|  | ||||
|     public String getFontType() { | ||||
|         return fontType; | ||||
|     } | ||||
|  | ||||
|     public void setFontType(String fontType) { | ||||
|         this.fontType = fontType; | ||||
|     } | ||||
|  | ||||
|     public Integer getHistoryDataClearEnable() { | ||||
|         return historyDataClearEnable; | ||||
|     } | ||||
|  | ||||
|     public void setHistoryDataClearEnable(Integer historyDataClearEnable) { | ||||
|         this.historyDataClearEnable = historyDataClearEnable; | ||||
|     } | ||||
|  | ||||
|     public Integer getReqFrequencyLimitEnable() { | ||||
|         return reqFrequencyLimitEnable; | ||||
|     } | ||||
|  | ||||
|     public void setReqFrequencyLimitEnable(Integer reqFrequencyLimitEnable) { | ||||
|         this.reqFrequencyLimitEnable = reqFrequencyLimitEnable; | ||||
|     } | ||||
|  | ||||
|     public int getReqGetLockLimit() { | ||||
|         return reqGetLockLimit; | ||||
|     } | ||||
|  | ||||
|     public void setReqGetLockLimit(int reqGetLockLimit) { | ||||
|         this.reqGetLockLimit = reqGetLockLimit; | ||||
|     } | ||||
|  | ||||
|     public int getReqGetLockSeconds() { | ||||
|         return reqGetLockSeconds; | ||||
|     } | ||||
|  | ||||
|     public void setReqGetLockSeconds(int reqGetLockSeconds) { | ||||
|         this.reqGetLockSeconds = reqGetLockSeconds; | ||||
|     } | ||||
|  | ||||
|     public int getReqGetMinuteLimit() { | ||||
|         return reqGetMinuteLimit; | ||||
|     } | ||||
|  | ||||
|     public void setReqGetMinuteLimit(int reqGetMinuteLimit) { | ||||
|         this.reqGetMinuteLimit = reqGetMinuteLimit; | ||||
|     } | ||||
|  | ||||
|     public int getReqCheckMinuteLimit() { | ||||
|         return reqCheckMinuteLimit; | ||||
|     } | ||||
|  | ||||
|     public void setReqCheckMinuteLimit(int reqCheckMinuteLimit) { | ||||
|         this.reqCheckMinuteLimit = reqCheckMinuteLimit; | ||||
|     } | ||||
|  | ||||
|     public int getReqVerifyMinuteLimit() { | ||||
|         return reqVerifyMinuteLimit; | ||||
|     } | ||||
|  | ||||
|     public void setReqVerifyMinuteLimit(int reqVerifyMinuteLimit) { | ||||
|         this.reqVerifyMinuteLimit = reqVerifyMinuteLimit; | ||||
|     } | ||||
|  | ||||
|     public String getCacheNumber() { | ||||
|         return cacheNumber; | ||||
|     } | ||||
|  | ||||
|     public void setCacheNumber(String cacheNumber) { | ||||
|         this.cacheNumber = cacheNumber; | ||||
|     } | ||||
|  | ||||
|     public String getTimingClear() { | ||||
|         return timingClear; | ||||
|     } | ||||
|  | ||||
|     public void setTimingClear(String timingClear) { | ||||
|         this.timingClear = timingClear; | ||||
|     } | ||||
|  | ||||
|     public String getWaterMark() { | ||||
|         return waterMark; | ||||
|     } | ||||
|  | ||||
|     public void setWaterMark(String waterMark) { | ||||
|         this.waterMark = waterMark; | ||||
|     } | ||||
|  | ||||
|     public String getWaterFont() { | ||||
|         return waterFont; | ||||
|     } | ||||
|  | ||||
|     public void setWaterFont(String waterFont) { | ||||
|         this.waterFont = waterFont; | ||||
|     } | ||||
|  | ||||
|     public String getInterferenceOptions() { | ||||
|         return interferenceOptions; | ||||
|     } | ||||
|  | ||||
|     public void setInterferenceOptions(String interferenceOptions) { | ||||
|         this.interferenceOptions = interferenceOptions; | ||||
|     } | ||||
|  | ||||
|     public int getFontStyle() { | ||||
|         return fontStyle; | ||||
|     } | ||||
|  | ||||
|     public void setFontStyle(int fontStyle) { | ||||
|         this.fontStyle = fontStyle; | ||||
|     } | ||||
|  | ||||
|     public int getFontSize() { | ||||
|         return fontSize; | ||||
|     } | ||||
|  | ||||
|     public void setFontSize(int fontSize) { | ||||
|         this.fontSize = fontSize; | ||||
|     } | ||||
|  | ||||
|     @Override | ||||
|     public String toString() { | ||||
|         return "BehaviorCaptchaProperties{" + "enabled=" + enabled + ", enableAes=" + enableAes + ", type=" + type + ", cacheType=" + cacheType + ", cacheImpl=" + cacheImpl + ", jigsawBaseMapPath='" + jigsawBaseMapPath + '\'' + ", slipOffset='" + slipOffset + '\'' + ", picClickBaseMapPath='" + picClickBaseMapPath + '\'' + ", fontType='" + fontType + '\'' + ", historyDataClearEnable=" + historyDataClearEnable + ", reqFrequencyLimitEnable=" + reqFrequencyLimitEnable + ", reqGetLockLimit=" + reqGetLockLimit + ", reqGetLockSeconds=" + reqGetLockSeconds + ", reqGetMinuteLimit=" + reqGetMinuteLimit + ", reqCheckMinuteLimit=" + reqCheckMinuteLimit + ", reqVerifyMinuteLimit=" + reqVerifyMinuteLimit + ", cacheNumber='" + cacheNumber + '\'' + ", timingClear='" + timingClear + '\'' + ", waterMark='" + waterMark + '\'' + ", waterFont='" + waterFont + '\'' + ", interferenceOptions='" + interferenceOptions + '\'' + ", fontStyle=" + fontStyle + ", fontSize=" + fontSize + '}'; | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -16,15 +16,12 @@ | ||||
|  | ||||
| package top.charles7c.continew.starter.captcha.behavior.enums; | ||||
|  | ||||
| import lombok.Getter; | ||||
|  | ||||
| /** | ||||
|  * 缓存类型枚举 | ||||
|  * | ||||
|  * @author Bull-BCLS | ||||
|  * @since 1.1.0 | ||||
|  */ | ||||
| @Getter | ||||
| public enum StorageType { | ||||
|  | ||||
|     /** | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 jasmine
					jasmine