com.maxiaofa.captcha.spring.boot.properties.RotateCaptchaProperties Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of rotate-captcha-spring-boot-starter Show documentation
Show all versions of rotate-captcha-spring-boot-starter Show documentation
RotateCaptcha rotate-captcha-spring-boot-starter
The newest version!
package com.maxiaofa.captcha.spring.boot.properties;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Component;
/**
* 验证码配置类
* @author MaXiaoFa
*/
@Component
@ConfigurationProperties(prefix = "rotate-captcha",ignoreInvalidFields = true)
@EnableConfigurationProperties({RotateCaptchaProperties.Rsa.class})
public class RotateCaptchaProperties {
/**
* 偏移角度
* */
private int angleOffset = 20;
/**
* 最大旋转角度
* */
private int angleMax = 300;
/**
* 最小旋转角度
* */
private int angleMin = 50;
/**
* 误差值
* */
private int fault = 20;
/**
* 过期时间(分钟)
* */
private long expireTime = 2;
@ConfigurationProperties(prefix = "rotate-captcha.rsa",ignoreInvalidFields = true)
public static class Rsa {
/**
* 是否启用加密
* */
private boolean enable = false;
/**
* 加密私钥
* */
private String rsaPrivate;
public String getRsaPrivate() {
return rsaPrivate;
}
public void setRsaPrivate(String rsaPrivate) {
this.rsaPrivate = rsaPrivate;
}
public boolean isEnable() {
return enable;
}
public void setEnable(boolean enable) {
this.enable = enable;
}
}
public int getAngleOffset() {
return angleOffset;
}
public void setAngleOffset(int angleOffset) {
this.angleOffset = angleOffset;
}
public int getAngleMax() {
return angleMax;
}
public void setAngleMax(int angleMax) {
this.angleMax = angleMax;
}
public int getAngleMin() {
return angleMin;
}
public void setAngleMin(int angleMin) {
this.angleMin = angleMin;
}
public int getFault() {
return fault;
}
public void setFault(int fault) {
this.fault = fault;
}
public long getExpireTime() {
return expireTime;
}
public void setExpireTime(long expireTime) {
this.expireTime = expireTime;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy