| | |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * Redisson 配置属性 |
| | | * |
| | |
| | | @Component |
| | | @ConfigurationProperties(prefix = "redisson") |
| | | public class RedissonProperties { |
| | | |
| | | |
| | | /** |
| | | * redis缓存key前缀 |
| | | */ |
| | | private String keyPrefix; |
| | | |
| | | |
| | | /** |
| | | * 线程池数量,默认值 = 当前处理核数量 * 2 |
| | | */ |
| | |
| | | * 集群服务配置 |
| | | */ |
| | | private ClusterServersConfig clusterServersConfig; |
| | | |
| | | /** |
| | | * 缓存组 |
| | | */ |
| | | private List<CacheGroup> cacheGroup; |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | |
| | | * 订阅模式 |
| | | */ |
| | | private SubscriptionMode subscriptionMode; |
| | | |
| | | } |
| | | |
| | | @Data |
| | | @NoArgsConstructor |
| | | public static class CacheGroup { |
| | | |
| | | /** |
| | | * 组id |
| | | */ |
| | | private String groupId; |
| | | |
| | | /** |
| | | * 组过期时间 |
| | | */ |
| | | private long ttl; |
| | | |
| | | /** |
| | | * 组最大空闲时间 |
| | | */ |
| | | private long maxIdleTime; |
| | | |
| | | /** |
| | | * 组最大长度 |
| | | */ |
| | | private int maxSize; |
| | | |
| | | } |
| | | |