com.spring.boxes.redis.lock.redisson.RedissonProperties Maven / Gradle / Ivy
The newest version!
package com.spring.boxes.redis.lock.redisson;
import lombok.Getter;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
@Getter
@ConfigurationProperties(prefix = "spring.lock.redisson")
public class RedissonProperties {
@Value("${spring.lock.redisson.timeout:${spring.redis.timeout:3000}}")
private int timeout;
@Value("${spring.lock.redisson.address:redis://${spring.redis.host}:${spring.redis.port}}")
private String address;
@Value("${spring.lock.redisson.database:${spring.redis.database:0}}")
private int database;
@Value("${spring.lock.redisson.connectionPoolSize:${spring.lock.redisson.connection-pool-size:${spring.redis.pool.maxIdle:${spring.redis.pool.max-idle:16}}}}")
private int connectionPoolSize;
@Value("${spring.lock.redisson.connectionMinimumIdleSize:${spring.lock.redisson.connection-minimum-idle-size:${spring.redis.pool.minIdle:${spring.redis.pool.min-idle:4}}}}")
private int connectionMinimumIdleSize;
@Value("${spring.lock.redisson.database:${spring.redis.password}}")
private String password;
public void setTimeout(int timeout) {
this.timeout = timeout;
}
public void setAddress(String address) {
this.address = address;
}
public void setConnectionPoolSize(int connectionPoolSize) {
this.connectionPoolSize = connectionPoolSize;
}
public void setConnectionMinimumIdleSize(int connectionMinimumIdleSize) {
this.connectionMinimumIdleSize = connectionMinimumIdleSize;
}
public void setDatabase(int database) {
this.database = database;
}
public void setPassword(String password) {
this.password = password;
}
}