Browse Source

Deprecate Guava support

pull/6979/head
Stephane Nicoll 10 years ago
parent
commit
bd7c20eb1c
  1. 2
      spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/GuavaCacheStatisticsProvider.java
  2. 6
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheProperties.java
  3. 1
      spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheType.java
  4. 4
      spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

2
spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/GuavaCacheStatisticsProvider.java vendored

@ -26,7 +26,9 @@ import org.springframework.cache.guava.GuavaCache; @@ -26,7 +26,9 @@ import org.springframework.cache.guava.GuavaCache;
*
* @author Stephane Nicoll
* @since 1.3.0
* @deprecated as of 1.5 following the removal of Guava support in Spring Framework 5
*/
@Deprecated
public class GuavaCacheStatisticsProvider implements CacheStatisticsProvider<GuavaCache> {
@Override

6
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheProperties.java vendored

@ -20,6 +20,7 @@ import java.util.ArrayList; @@ -20,6 +20,7 @@ import java.util.ArrayList;
import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
import org.springframework.core.io.Resource;
import org.springframework.util.Assert;
@ -266,10 +267,15 @@ public class CacheProperties { @@ -266,10 +267,15 @@ public class CacheProperties {
*/
private String spec;
@Deprecated
@DeprecatedConfigurationProperty(
reason = "Caffeine will supersede the Guava support in Spring Boot 2.0",
replacement = "spring.cache.caffeine.spec")
public String getSpec() {
return this.spec;
}
@Deprecated
public void setSpec(String spec) {
this.spec = spec;
}

1
spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/cache/CacheType.java vendored

@ -69,6 +69,7 @@ public enum CacheType { @@ -69,6 +69,7 @@ public enum CacheType {
/**
* Guava backed caching.
*/
@Deprecated
GUAVA,
/**

4
spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc

@ -3799,7 +3799,7 @@ providers (in this order): @@ -3799,7 +3799,7 @@ providers (in this order):
* <<boot-features-caching-provider-couchbase,Couchbase>>
* <<boot-features-caching-provider-redis,Redis>>
* <<boot-features-caching-provider-caffeine,Caffeine>>
* <<boot-features-caching-provider-guava,Guava>>
* <<boot-features-caching-provider-guava,Guava>> (deprecated)
* <<boot-features-caching-provider-simple,Simple>>
TIP: It is also possible to _force_ the cache provider to use via the `spring.cache.type`
@ -4019,7 +4019,7 @@ auto-configuration. @@ -4019,7 +4019,7 @@ auto-configuration.
[[boot-features-caching-provider-guava]]
==== Guava
==== Guava (deprecated)
If Guava is present, a `GuavaCacheManager` is auto-configured. Caches can be created
on startup using the `spring.cache.cache-names` property and customized by one of the
following (in this order):

Loading…
Cancel
Save