From 83e4e964006efc83cb0abd77536cf90ccb90c001 Mon Sep 17 00:00:00 2001 From: John Blum Date: Wed, 1 Nov 2017 21:45:29 -0700 Subject: [PATCH] Change cacheServerFactoryBean in the nested Application ClientCacheConfiguration class, clientCacheServerPortConfigurer bean definition to properly denote the ClientCacheFatoryBean. Move the @SuppressWarnings("unused") declaration out of the documenation source code reference. --- .../gemfire/src/main/java/sample/client/Application.java | 5 +++-- .../gemfire/src/main/java/sample/server/GemFireServer.java | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/samples/boot/gemfire/src/main/java/sample/client/Application.java b/samples/boot/gemfire/src/main/java/sample/client/Application.java index a1ded2c..53d46f5 100644 --- a/samples/boot/gemfire/src/main/java/sample/client/Application.java +++ b/samples/boot/gemfire/src/main/java/sample/client/Application.java @@ -61,6 +61,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; * @see org.apache.geode.cache.client.Pool * @since 1.2.1 */ +@SuppressWarnings("unused") // tag::class[] @SpringBootApplication // <1> @Controller // <2> @@ -89,8 +90,8 @@ public class Application { ClientCacheConfigurer clientCacheServerPortConfigurer( @Value("${spring.session.data.geode.cache.server.port:40404}") int port) { // <5> - return (beanName, cacheServerFactoryBean) -> - cacheServerFactoryBean.setServers(Collections.singletonList( + return (beanName, clientCacheFactoryBean) -> + clientCacheFactoryBean.setServers(Collections.singletonList( newConnectionEndpoint("localhost", port))); } } diff --git a/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java b/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java index 8708c7a..a2ef65b 100644 --- a/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java +++ b/samples/boot/gemfire/src/main/java/sample/server/GemFireServer.java @@ -38,12 +38,12 @@ import org.springframework.session.data.gemfire.config.annotation.web.http.Enabl * @see org.apache.geode.cache.Cache * @since 1.2.1 */ +@SuppressWarnings("unused") // tag::class[] @SpringBootApplication // <1> @CacheServerApplication(name = "SpringSessionDataGeodeServerBootSample", logLevel = "warning") // <2> @EnableGemFireHttpSession(maxInactiveIntervalInSeconds = 20) // <3> @EnableManager(start = true) // <4> -@SuppressWarnings("unused") public class GemFireServer { public static void main(String[] args) {