When Spring Boot for Apache Geode, or alternatively GemFire, (SBDG) is on the classpath of your Spring Boot application (see here), then SBDG auto-configuration will automatically create and configure a ClientCache
instance for you (see here).
TIP: You can also review the Getting Stated Sample Guide and Source to see this behavior in action, for yourself. The Guide also talks about the use of the @EnableClusterAware
annotation, here.
The @EnableClusterAware
annotation is simply a development-time, SBDG annotation that enables you to switch between environments (e.g. local vs. managed, such as when pushing your Spring Boot application up to run in PCF, connected to PCC, and then testing locally in your IDE) without having to change any configuration (hence the goals).
The @EnableClusterAware
annotation does not create any GemFire/Geode cache instances for you. Only SBDG's auto-configuration, or declaring an explicit SDG annotation (e.g. @ClientCacheApplication
) will do that for you. Still, when using SBDG auto-configuration, you do not need an explicit SDG cache application annotation, like @ClientCacheApplication
, since SBDG auto-configuration (again) creates and configures a ClientCache
instance by default.
TIP: See the documentation on the @EnableClusterAware
annotation for more details.
If ClientCache
is not provided (auto-configured), then you are not:
- Using SBDG, or rather do not have SBDG on the Spring Boot application classpath (see here)
- Have not bootstrapped or configured and ran your Spring application with Spring Boot
- Your Spring Boot application configuration is incorrect
- You have explicitly disabled or overrode the SBDG auto-configuration
- Etc.
One or more of these have to be true.