com.gitee.cliveyuan.tools.bean.CaptchaRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of java-tools Show documentation
Show all versions of java-tools Show documentation
Some commonly used methods in java
package com.gitee.cliveyuan.tools.bean;
import com.gitee.cliveyuan.tools.enums.CaptchaGenerateType;
import lombok.Builder;
import lombok.Data;
import org.springframework.cache.CacheManager;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.Serializable;
/**
* Created by Clive on 2019/06/16.
*/
@Data
@Builder
public class CaptchaRequest implements Serializable {
/**
* 验证码生成类型 (必须)
*/
private CaptchaGenerateType generateType;
/**
* http 请求 (生成类型为SESSION时必须)
*/
private HttpServletRequest request;
/**
* 缓存管理器 (生成类型为CACHE时必须)
*/
private CacheManager cacheManager;
/**
* 缓存命名空间 (生成类型为CACHE时必须)
*/
private String cacheNamespace;
/**
* http 响应 (必须, 用于生成验证码)
*/
private HttpServletResponse response;
/**
* 验证码id (不传则自动生成)
*/
private String id;
/**
* 验证码存储名 (不传则采用默认值, 与验证时保持一致)
*/
private String name;
/**
* 验证码位数 (不传则采用默认值)
*/
private int length;
/**
* 宽度 (不传则采用默认值)
*/
private int width;
/**
* 高度 (不传则采用默认值)
*/
private int height;
}