This commit is contained in:
Phillip Webb
2018-01-29 09:46:52 -08:00
parent 488965bb06
commit af50a18da9
15 changed files with 42 additions and 43 deletions

View File

@@ -69,7 +69,8 @@ class RedisCacheConfiguration {
public RedisCacheManager cacheManager(RedisConnectionFactory redisConnectionFactory,
ResourceLoader resourceLoader) {
RedisCacheManagerBuilder builder = RedisCacheManager
.builder(redisConnectionFactory).cacheDefaults(determineConfiguration(resourceLoader.getClassLoader()));
.builder(redisConnectionFactory)
.cacheDefaults(determineConfiguration(resourceLoader.getClassLoader()));
List<String> cacheNames = this.cacheProperties.getCacheNames();
if (!cacheNames.isEmpty()) {
builder.initialCacheNames(new LinkedHashSet<>(cacheNames));
@@ -85,8 +86,8 @@ class RedisCacheConfiguration {
Redis redisProperties = this.cacheProperties.getRedis();
org.springframework.data.redis.cache.RedisCacheConfiguration config = org.springframework.data.redis.cache.RedisCacheConfiguration
.defaultCacheConfig();
config = config.serializeValuesWith(SerializationPair.fromSerializer(
new JdkSerializationRedisSerializer(classLoader)));
config = config.serializeValuesWith(SerializationPair
.fromSerializer(new JdkSerializationRedisSerializer(classLoader)));
if (redisProperties.getTimeToLive() != null) {
config = config.entryTtl(redisProperties.getTimeToLive());
}

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2017 the original author or authors.
* Copyright 2012-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,9 +78,9 @@ public class HttpEncodingAutoConfiguration {
}
@Override
public void customize(ConfigurableServletWebServerFactory webServerFactory) {
public void customize(ConfigurableServletWebServerFactory factory) {
if (this.properties.getMapping() != null) {
webServerFactory.setLocaleCharsetMappings(this.properties.getMapping());
factory.setLocaleCharsetMappings(this.properties.getMapping());
}
}

View File

@@ -119,7 +119,7 @@ public class ReactiveWebServerAutoConfigurationTests {
@Bean
public WebServerFactoryCustomizer<ConfigurableReactiveWebServerFactory> reactiveWebServerCustomizer() {
return (server) -> server.setPort(9000);
return (factory) -> factory.setPort(9000);
}
}