From fda6362f00930be869eab54da05bab0b11adba51 Mon Sep 17 00:00:00 2001 From: John Blum Date: Sun, 17 May 2020 23:37:54 -0700 Subject: [PATCH] Annotate the BootGeodeHttpSessionCachingApplication class with the @EnableClusterAware annotation. Remove the 'Sessions' Region data policy configuration from application.properties. --- .../session/http/BootGeodeHttpSessionCachingApplication.java | 5 +++++ .../http-session/src/main/resources/application.properties | 1 - 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/spring-geode-samples/caching/http-session/src/main/java/example/app/caching/session/http/BootGeodeHttpSessionCachingApplication.java b/spring-geode-samples/caching/http-session/src/main/java/example/app/caching/session/http/BootGeodeHttpSessionCachingApplication.java index 46aeb212..f666fcd0 100644 --- a/spring-geode-samples/caching/http-session/src/main/java/example/app/caching/session/http/BootGeodeHttpSessionCachingApplication.java +++ b/spring-geode-samples/caching/http-session/src/main/java/example/app/caching/session/http/BootGeodeHttpSessionCachingApplication.java @@ -17,6 +17,7 @@ package example.app.caching.session.http; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.geode.config.annotation.EnableClusterAware; /** * {@link SpringBootApplication} to demo HTTP Session state caching. @@ -24,12 +25,16 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; * @author John Blum * @see org.springframework.boot.SpringApplication * @see org.springframework.boot.autoconfigure.SpringBootApplication + * @see org.springframework.geode.config.annotation.EnableClusterAware * @since 1.1.0 */ +//tag::class[] @SpringBootApplication +@EnableClusterAware public class BootGeodeHttpSessionCachingApplication { public static void main(String[] args) { SpringApplication.run(BootGeodeHttpSessionCachingApplication.class, args); } } +//end::class[] diff --git a/spring-geode-samples/caching/http-session/src/main/resources/application.properties b/spring-geode-samples/caching/http-session/src/main/resources/application.properties index 22a44763..d5ec1af9 100644 --- a/spring-geode-samples/caching/http-session/src/main/resources/application.properties +++ b/spring-geode-samples/caching/http-session/src/main/resources/application.properties @@ -3,6 +3,5 @@ spring.application.name=HttpSessionCachingApplication spring.data.gemfire.cache.log-level=error spring.session.data.gemfire.cache.client.pool.name=DEFAULT -spring.session.data.gemfire.cache.client.region.shortcut=LOCAL spring.session.data.gemfire.session.region.name=Sessions server.servlet.session.timeout=15