com.opcooc.captcha.autoconfigure.CaptchaSliderProperties Maven / Gradle / Ivy
/*
* Copyright © 2020-2021 organization opcooc ([email protected])
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* 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 com.opcooc.captcha.autoconfigure;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
/**
* @author opcooc
*/
@Getter
@Setter
@NoArgsConstructor
public class CaptchaSliderProperties {
/**
* 生成图片的宽度
*
* @param width 参数
* @return 值
*/
private Integer width = 480;
/**
* 生成图片高度
*
* @param height 参数
* @return 值
*/
private Integer height = 240;
/**
* 余量
*
* @param margin 参数
* @return 值
*/
public Integer margin = 8;
/**
* 滑块模板图片大小
*
* @param sliderSize 参数
* @return 值
*/
private Integer sliderSize = 40 * 2;
/**
* 滑块图片裁剪多余信息时的填充宽度
*
* @param sliderSubWidth 参数
* @return 值
*/
private Integer sliderSubWidth = 5;
/**
* 原始图片目录, 默认 classpath:static/image/slider/original,
* 不以 "classpath:" 开头时即认为是绝对路径, 以 "classpath:" 开头时即认为是基于 classpath 的相对路径.
*
* @param originalImageDirectory 参数
* @return 值
*/
private String originalImageDirectory = "classpath:static/pic-click/original/*.png";
/**
* 根据原始图片生成的滑块图片目录,用于自定义缓存滑块图片的存储目录, 默认 classpath:static/image/slider/code,
* 不以 "classpath:" 开头时即认为是绝对路径, 以 "classpath:" 开头时即认为是基于 classpath 的相对路径.
*
* @param codeImageDirectory 参数
* @return 值
*/
private String codeImageDirectory = "classpath:static/slider/code";
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy