org.shoulder.code.store.impl.RedisValidateCodeRepository Maven / Gradle / Ivy
The newest version!
package org.shoulder.code.store.impl;
import org.shoulder.code.dto.ValidateCodeDTO;
import org.shoulder.code.store.ValidateCodeStore;
import org.shoulder.code.exception.ValidateCodeException;
import org.apache.commons.lang3.StringUtils;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.web.context.request.ServletWebRequest;
import java.util.concurrent.TimeUnit;
/**
* 基于redis的验证码存取器,避免由于没有session导致无法存取验证码的问题
* @author lym
*/
public class RedisValidateCodeRepository implements ValidateCodeStore {
private static final String DEFAULT_KEY_PREFIX = "CAPTCHA_CODE:";
private RedisTemplate
© 2015 - 2025 Weber Informatics LLC | Privacy Policy