Deprecate Guava support
This commit is contained in:
parent
474c2e4641
commit
bd7c20eb1c
|
@ -26,7 +26,9 @@ import org.springframework.cache.guava.GuavaCache;
|
||||||
*
|
*
|
||||||
* @author Stephane Nicoll
|
* @author Stephane Nicoll
|
||||||
* @since 1.3.0
|
* @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> {
|
public class GuavaCacheStatisticsProvider implements CacheStatisticsProvider<GuavaCache> {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -20,6 +20,7 @@ import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
import org.springframework.boot.context.properties.DeprecatedConfigurationProperty;
|
||||||
import org.springframework.core.io.Resource;
|
import org.springframework.core.io.Resource;
|
||||||
import org.springframework.util.Assert;
|
import org.springframework.util.Assert;
|
||||||
|
|
||||||
|
@ -266,10 +267,15 @@ public class CacheProperties {
|
||||||
*/
|
*/
|
||||||
private String spec;
|
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() {
|
public String getSpec() {
|
||||||
return this.spec;
|
return this.spec;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Deprecated
|
||||||
public void setSpec(String spec) {
|
public void setSpec(String spec) {
|
||||||
this.spec = spec;
|
this.spec = spec;
|
||||||
}
|
}
|
||||||
|
|
|
@ -69,6 +69,7 @@ public enum CacheType {
|
||||||
/**
|
/**
|
||||||
* Guava backed caching.
|
* Guava backed caching.
|
||||||
*/
|
*/
|
||||||
|
@Deprecated
|
||||||
GUAVA,
|
GUAVA,
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -3799,7 +3799,7 @@ providers (in this order):
|
||||||
* <<boot-features-caching-provider-couchbase,Couchbase>>
|
* <<boot-features-caching-provider-couchbase,Couchbase>>
|
||||||
* <<boot-features-caching-provider-redis,Redis>>
|
* <<boot-features-caching-provider-redis,Redis>>
|
||||||
* <<boot-features-caching-provider-caffeine,Caffeine>>
|
* <<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>>
|
* <<boot-features-caching-provider-simple,Simple>>
|
||||||
|
|
||||||
TIP: It is also possible to _force_ the cache provider to use via the `spring.cache.type`
|
TIP: It is also possible to _force_ the cache provider to use via the `spring.cache.type`
|
||||||
|
@ -4019,7 +4019,7 @@ auto-configuration.
|
||||||
|
|
||||||
|
|
||||||
[[boot-features-caching-provider-guava]]
|
[[boot-features-caching-provider-guava]]
|
||||||
==== Guava
|
==== Guava (deprecated)
|
||||||
If Guava is present, a `GuavaCacheManager` is auto-configured. Caches can be created
|
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
|
on startup using the `spring.cache.cache-names` property and customized by one of the
|
||||||
following (in this order):
|
following (in this order):
|
||||||
|
|
Loading…
Reference in New Issue