Problem creating region and persist region to disk Geode Gemfire Spring Boot

I finally found the way around this, after reading answer from John Blum several time from SpringData Gemfire DiskStore.

Definitely I couldn't use @EnableClusterConfiguration in my case (still wondering why). According to John, we are able to create Region using gfsh. From this I get an idea to do the same at Spring Boot CacheServer. So, how if I define my POJO at CacheServer and let annotation @EnableEntityDefinedRegions do the job to create the region at CacheServer side. Again I borrow

serverRegionShortcut = RegionShortcut.PARTITION_PERSISTENT

from John but I put it at


Beside that I also need to persist my PDX type (Spring and/or Geode Gemfire do not like me if I am not persisting Pdx type at CacheServer side). So, I am using the same method to persist from SpringData Gemfire DiskStore but I implement it at CacheServer side with some additional entry at to tell spring to persist Pdx type as well.

In that way, I am able to successfully create and persisting Region at CacheServer side and also persisting Pdx as well.

Here is the complete code and I made with borrowing the idea from SpringData Gemfire DiskStore.

I appreciate if anybody able to tell me whether this work around is a good way to do or is there any other way or any better idea (still wondering though why @EnableClusterConfiguration doesn't like me while anybody else has no problem with it :=(, so if there is anybody who is able to tell me where is(are) my mistake(s) I really appreciate it ).


@ClientCacheApplication(logLevel = "debug", locators = {@Locator(host = "localhost", port = 10334)})
@EnablePool(name="neptunusPool", servers=@Server(host="localhost", port=41414))
@EnableGemfireRepositories(basePackageClasses= {TitleContentRepository.class})
@EnableEntityDefinedRegions(basePackageClasses= {TitleContent.class

public class CommerceHostGeodeApplication {

    public static void main(String[] args) {, args);



At client side the same POJO, Repository and RestController and nothing in except for server.port definition.


@CacheServerApplication(locators="localhost[10334]", name="GeodeServerApplication" )
@EnableCacheServer(name="neptunus", autoStartup=true, hostnameForClients = "localhost", port = 41414)
@EnableDiskStore(name = "disk_store")
@EnableEntityDefinedRegions(basePackageClasses= {TitleContent.class
}, serverRegionShortcut = RegionShortcut.PARTITION_PERSISTENT)
public class GeodeServerApplication {

    public static void main(String[] args) {, args);




Upon CacheServer start, region is created and is able to persist / save to disk.