diff --git a/spring-boot-modules/spring-boot-caching/pom.xml b/spring-boot-modules/spring-boot-caching/pom.xml index 1b4655e17a08..010e6079ae34 100644 --- a/spring-boot-modules/spring-boot-caching/pom.xml +++ b/spring-boot-modules/spring-boot-caching/pom.xml @@ -18,10 +18,16 @@ org.springframework.boot spring-boot-starter-web - + org.springframework spring-context + 6.2.11 + + + org.springframework + spring-context-support + 6.2.11 org.springframework.boot @@ -106,4 +112,4 @@ 1.4.0 - \ No newline at end of file + diff --git a/spring-boot-modules/spring-boot-caching/src/main/java/com/baeldung/caching/example/CustomerDataService.java b/spring-boot-modules/spring-boot-caching/src/main/java/com/baeldung/caching/example/CustomerDataService.java index 005a85fcb4f5..7d1043c656e4 100644 --- a/spring-boot-modules/spring-boot-caching/src/main/java/com/baeldung/caching/example/CustomerDataService.java +++ b/spring-boot-modules/spring-boot-caching/src/main/java/com/baeldung/caching/example/CustomerDataService.java @@ -8,7 +8,7 @@ import org.springframework.stereotype.Component; @Component -@CacheConfig(cacheNames = { "addresses" }) +@CacheConfig("addresses") public class CustomerDataService { // this method configuration is equivalent to xml configuration