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

@EnableEntityDefinedRegions

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 application.properties 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 application.properties 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 ).

CLIENT :

@SpringBootApplication
@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
})
//@ReplicateRegion
//@EnableClusterDefinedRegions
//@EnableCachingDefinedRegions
//@EnableGemfireCaching
@EnableIndexing
//@EnableClusterConfiguration
@EnablePdx

public class CommerceHostGeodeApplication {

    public static void main(String[] args) {

        SpringApplication.run(CommerceHostGeodeApplication.class, args);

    }

}

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

CACHESERVER :

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

    public static void main(String[] args) {
        SpringApplication.run(GeodeServerApplication.class, args);
    }

}

CACHESERVER application.properties :

server.port=15010
spring.data.gemfire.disk.store.name=disk_store
spring.data.gemfire.disk.store.directory.location=/Users/ars/geode/data
spring.data.gemfire.pdx.disk-store-name=disk_store
spring.data.gemfire.pdx.persistent=true
spring.data.gemfire.management.use-http=true

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