style: 应用 Spotless 代码格式化
- 对所有 Java 源文件应用统一的代码格式化 - 统一缩进为 4 个空格 - 清理尾随空白字符和文件末尾换行 - 优化导入语句组织 - 总计格式化 654 个 Java 文件 有问题可以回滚或者找我聊
This commit is contained in:
@@ -4,14 +4,13 @@ import cn.hutool.core.util.StrUtil;
|
||||
import com.starry.common.constant.CacheConstants;
|
||||
import com.starry.common.domain.Captcha;
|
||||
import com.starry.common.utils.CaptchaUtils;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.data.redis.core.ValueOperations;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.data.redis.core.StringRedisTemplate;
|
||||
import org.springframework.data.redis.core.ValueOperations;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
/**
|
||||
* 验证码服务
|
||||
|
||||
@@ -1,14 +1,13 @@
|
||||
package com.starry.common.redis;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
import javax.annotation.Resource;
|
||||
import org.springframework.dao.QueryTimeoutException;
|
||||
import org.springframework.data.redis.core.RedisTemplate;
|
||||
import org.springframework.data.redis.core.ValueOperations;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Collection;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author rieds 工具类
|
||||
* @since 2022/8/26
|
||||
@@ -22,7 +21,8 @@ public class RedisCache {
|
||||
/**
|
||||
* 获得缓存的基本对象。
|
||||
*
|
||||
* @param key 缓存键值
|
||||
* @param key
|
||||
* 缓存键值
|
||||
* @return 缓存键值对应的数据
|
||||
*/
|
||||
public <T> T getCacheObject(final String key) {
|
||||
@@ -38,8 +38,10 @@ public class RedisCache {
|
||||
/**
|
||||
* 缓存基本的对象,Integer、String、实体类等
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
* @param value 缓存的值
|
||||
* @param key
|
||||
* 缓存的键值
|
||||
* @param value
|
||||
* 缓存的值
|
||||
*/
|
||||
public <T> void setCacheObject(final String key, final T value) {
|
||||
redisTemplate.opsForValue().set(key, value);
|
||||
@@ -48,10 +50,14 @@ public class RedisCache {
|
||||
/**
|
||||
* 缓存基本的对象,Integer、String、实体类等
|
||||
*
|
||||
* @param key 缓存的键值
|
||||
* @param value 缓存的值
|
||||
* @param timeout 过期时间
|
||||
* @param timeUnit 时间颗粒度
|
||||
* @param key
|
||||
* 缓存的键值
|
||||
* @param value
|
||||
* 缓存的值
|
||||
* @param timeout
|
||||
* 过期时间
|
||||
* @param timeUnit
|
||||
* 时间颗粒度
|
||||
*/
|
||||
public <T> void setCacheObject(final String key, final T value, final Long timeout, final TimeUnit timeUnit) {
|
||||
redisTemplate.opsForValue().set(key, value, timeout, timeUnit);
|
||||
@@ -69,7 +75,8 @@ public class RedisCache {
|
||||
/**
|
||||
* 获得缓存的基本对象列表
|
||||
*
|
||||
* @param pattern 字符串前缀
|
||||
* @param pattern
|
||||
* 字符串前缀
|
||||
* @return 对象列表
|
||||
*/
|
||||
public Collection<String> keys(final String pattern) {
|
||||
@@ -79,7 +86,8 @@ public class RedisCache {
|
||||
/**
|
||||
* 删除集合对象
|
||||
*
|
||||
* @param collection 多个对象
|
||||
* @param collection
|
||||
* 多个对象
|
||||
* @return
|
||||
*/
|
||||
public long deleteObject(final Collection collection) {
|
||||
|
||||
Reference in New Issue
Block a user