Annotate the Look-Aside Caching GeodeConfiguration class with the @EnableClusterAware annotation.

Remove the explicit 'clientRegionShortcut' configuration from the @EnableCachingDefinedRegions annotation specifying a client 'LOCAL' Region.
This commit is contained in:
John Blum
2020-05-18 00:41:24 -07:00
parent 898b3351fa
commit 6253000ee5

View File

@@ -15,26 +15,23 @@
*/
package example.app.caching.lookaside.config;
import org.apache.geode.cache.client.ClientRegionShortcut;
import org.springframework.context.annotation.Configuration;
import org.springframework.data.gemfire.config.annotation.EnableCachingDefinedRegions;
import org.springframework.data.gemfire.config.annotation.EnableLogging;
import org.springframework.geode.config.annotation.EnableClusterAware;
/**
* Spring {@link Configuration} class used to configure Apache Geode.
*
* @author John Blum
* @see org.apache.geode.cache.client.ClientRegionShortcut
* @see org.springframework.context.annotation.Configuration
* @see org.springframework.data.gemfire.config.annotation.EnableCachingDefinedRegions
* @see org.springframework.data.gemfire.config.annotation.EnableClusterConfiguration
* @see org.springframework.geode.config.annotation.EnableClusterAware
* @since 1.0.0
*/
@SuppressWarnings("unused")
// tag::class[]
@Configuration
@EnableLogging(logLevel = "error")
@EnableCachingDefinedRegions(clientRegionShortcut = ClientRegionShortcut.LOCAL)
@EnableClusterAware
@EnableCachingDefinedRegions
public class GeodeConfiguration { }
// end::class[]