From d7ee1a96991f4f2854ed388861797f1a8f4765be Mon Sep 17 00:00:00 2001 From: Ankur Gupta Date: Sat, 18 Apr 2020 15:52:19 +0530 Subject: [PATCH] Fixes as per editor Suggestions --- spring-caching/pom.xml | 101 +++++++++--------- .../src/main/resources/application.properties | 2 - ...ltipleCacheManagerIntegrationUnitTest.java | 4 +- 3 files changed, 53 insertions(+), 54 deletions(-) diff --git a/spring-caching/pom.xml b/spring-caching/pom.xml index 11dd9a8873..f56d3cf328 100644 --- a/spring-caching/pom.xml +++ b/spring-caching/pom.xml @@ -1,54 +1,55 @@ - - 4.0.0 - spring-caching - 0.1-SNAPSHOT - spring-caching - war + + 4.0.0 + spring-caching + 0.1-SNAPSHOT + spring-caching + war - - com.baeldung - parent-boot-2 - 0.0.1-SNAPSHOT - ../parent-boot-2 - + + com.baeldung + parent-boot-2 + 0.0.1-SNAPSHOT + ../parent-boot-2 + - - + + org.springframework.boot spring-boot-starter-web - - org.springframework - spring-context - - - org.springframework.boot - spring-boot-starter-cache - - - org.springframework - spring-web - - - org.springframework - spring-webmvc - - - org.ehcache - ehcache - - - org.springframework - spring-test - test - - - com.github.ben-manes.caffeine - caffeine - - + + org.springframework + spring-context + + + org.springframework.boot + spring-boot-starter-cache + + + org.springframework + spring-web + + + org.springframework + spring-webmvc + + + org.ehcache + ehcache + + + org.springframework + spring-test + test + + + com.github.ben-manes.caffeine + caffeine + + com.h2database h2 runtime @@ -57,10 +58,10 @@ org.springframework.boot spring-boot-starter-jdbc - + + + + 3.5.2 + - - 3.5.2 - - \ No newline at end of file diff --git a/spring-caching/src/main/resources/application.properties b/spring-caching/src/main/resources/application.properties index 53a3ac93b4..ee7b5e62c0 100644 --- a/spring-caching/src/main/resources/application.properties +++ b/spring-caching/src/main/resources/application.properties @@ -2,8 +2,6 @@ spring.datasource.url=jdbc:h2:mem:testdb spring.datasource.driverClassName=org.h2.Driver spring.datasource.username=sa spring.datasource.password= -#spring.h2.console.enabled=false - # Enabling H2 Console spring.h2.console.enabled=true diff --git a/spring-caching/src/test/java/com/baeldung/multiplecachemanager/MultipleCacheManagerIntegrationUnitTest.java b/spring-caching/src/test/java/com/baeldung/multiplecachemanager/MultipleCacheManagerIntegrationUnitTest.java index 4bcbdb4d68..e02e5da246 100644 --- a/spring-caching/src/test/java/com/baeldung/multiplecachemanager/MultipleCacheManagerIntegrationUnitTest.java +++ b/spring-caching/src/test/java/com/baeldung/multiplecachemanager/MultipleCacheManagerIntegrationUnitTest.java @@ -32,7 +32,7 @@ public class MultipleCacheManagerIntegrationUnitTest { private CacheManager alternateCacheManager; @Test - public void whenCallGetOrderDetail_thenDataShouldBeInCaffieneCacheManager() { + public void givenCacheResolverIsConfigured_whenCallGetOrderDetail_thenDataShouldBeInCaffieneCacheManager() { Integer key = 30001; cacheManager.getCache("orders") .evict(key); @@ -50,7 +50,7 @@ public class MultipleCacheManagerIntegrationUnitTest { } @Test - public void whenCallGetOrderPrice_thenDataShouldBeInAlternateCacheManager() { + public void givenCacheResolverIsConfigured_whenCallGetOrderPrice_thenDataShouldBeInAlternateCacheManager() { Integer key = 30001; alternateCacheManager.getCache("orderprice") .evict(key);