Code snippet optimization
This commit is contained in:
@@ -56,7 +56,7 @@ public abstract class RedisReactiveConfig {
|
||||
|
||||
public ReactiveRedisConnectionFactory lettuceConnectionFactory() {
|
||||
|
||||
log.info("connect to " + redisReactiveProperties);
|
||||
log.info("connect to {}", redisReactiveProperties);
|
||||
|
||||
RedisStandaloneConfiguration rcs = new RedisStandaloneConfiguration(redisReactiveProperties.getHost(), redisReactiveProperties.getPort());
|
||||
String password = redisReactiveProperties.getPassword();
|
||||
@@ -65,8 +65,8 @@ public abstract class RedisReactiveConfig {
|
||||
}
|
||||
rcs.setDatabase(redisReactiveProperties.getDatabase());
|
||||
|
||||
GenericObjectPoolConfig poolConfig = new GenericObjectPoolConfig();
|
||||
poolConfig.setMaxTotal(16);
|
||||
GenericObjectPoolConfig<?> poolConfig = new GenericObjectPoolConfig<>();
|
||||
poolConfig.setMaxTotal(poolConfig.getMaxTotal() * 2);
|
||||
LettucePoolingClientConfiguration ccs = LettucePoolingClientConfiguration.builder()
|
||||
.clientResources(clientResources)
|
||||
.clientOptions(ClientOptions.builder().publishOnScheduler(true).build())
|
||||
|
||||
@@ -82,6 +82,7 @@ public class Dict {
|
||||
@JsonProperty("create") long create,
|
||||
@JsonProperty("update") long update
|
||||
) {
|
||||
|
||||
this.isDeleted = isDeleted;
|
||||
this.id = id;
|
||||
this.key = key;
|
||||
@@ -89,6 +90,7 @@ public class Dict {
|
||||
this.value = value;
|
||||
this.create = create;
|
||||
this.update = update;
|
||||
|
||||
if (type == BOOLEAN) {
|
||||
booleanVal = Boolean.parseBoolean(value);
|
||||
} else if (type == STRING) {
|
||||
|
||||
Reference in New Issue
Block a user