sa-token/sa-token-demo/sa-token-demo-springboot-redisson/src/main/java/com/pj/redisson/RedissonProperties.java

57 lines
1.3 KiB
Java

package com.pj.redisson;
import org.redisson.config.SingleServerConfig;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.NestedConfigurationProperty;
import org.springframework.stereotype.Component;
/**
* Redisson 配置属性
*
* @author 疯狂的狮子Li
*/
@Component
@ConfigurationProperties(prefix = "redisson")
public class RedissonProperties {
/**
* 线程池数量,默认值 = 当前处理核数量 * 2
*/
private int threads;
/**
* Netty线程池数量,默认值 = 当前处理核数量 * 2
*/
private int nettyThreads;
/**
* 单机服务配置
*/
@NestedConfigurationProperty
private SingleServerConfig singleServerConfig;
public int getThreads() {
return threads;
}
public void setThreads(int threads) {
this.threads = threads;
}
public int getNettyThreads() {
return nettyThreads;
}
public void setNettyThreads(int nettyThreads) {
this.nettyThreads = nettyThreads;
}
public SingleServerConfig getSingleServerConfig() {
return singleServerConfig;
}
public void setSingleServerConfig(SingleServerConfig singleServerConfig) {
this.singleServerConfig = singleServerConfig;
}
}