Skip to content

Commit 9baeb86

Browse files
authored
BAEL-9473 Support @cAcHecONFig("myCacheName") Declarations in Spring (#18864)
* Update CustomerDataService.java * Update pom.xml
1 parent 59dc3b2 commit 9baeb86

File tree

2 files changed

+9
-3
lines changed

2 files changed

+9
-3
lines changed

spring-boot-modules/spring-boot-caching/pom.xml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,16 @@
1818
<dependency>
1919
<groupId>org.springframework.boot</groupId>
2020
<artifactId>spring-boot-starter-web</artifactId>
21-
</dependency>
21+
</dependency>
2222
<dependency>
2323
<groupId>org.springframework</groupId>
2424
<artifactId>spring-context</artifactId>
25+
<version>6.2.11</version>
26+
</dependency>
27+
<dependency>
28+
<groupId>org.springframework</groupId>
29+
<artifactId>spring-context-support</artifactId>
30+
<version>6.2.11</version>
2531
</dependency>
2632
<dependency>
2733
<groupId>org.springframework.boot</groupId>
@@ -106,4 +112,4 @@
106112
<embedded.redis.version>1.4.0</embedded.redis.version>
107113
</properties>
108114

109-
</project>
115+
</project>

spring-boot-modules/spring-boot-caching/src/main/java/com/baeldung/caching/example/CustomerDataService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
import org.springframework.stereotype.Component;
99

1010
@Component
11-
@CacheConfig(cacheNames = { "addresses" })
11+
@CacheConfig("addresses")
1212
public class CustomerDataService {
1313

1414
// this method configuration is equivalent to xml configuration

0 commit comments

Comments
 (0)