无法使用Spring数据找到Gemfire区域



我能够成功运行spring-gemfire-examples-master/spring-cache项目。但是,当我尝试连接本地定位器时,它告诉我在gemfireache中找不到region1。但是,我可以看到在Pulse中已经建立了一个连接。我的步骤:

  1. 打开窗口命令,启动locator1,启动server1,创建region1
  2. 将sample文件夹中的spring-cache…cache-context.xml更改为

  3. 以gradlew方式运行示例-q Run -spring-cache

我是Gemfire的新手。

<util:properties id="gemfire-props">
    <prop key="log-level">warning</prop>
</util:properties>
<gfe:client-cache id="client-cache"   pool-name="my-pool"></gfe:client-cache>
<gfe:pool id="my-pool" subscription-enabled="true">
 <gfe:locator host="localhost" port="10334"></gfe:locator>
</gfe:pool>
<gfe:lookup-region id="Region1" name="Region1" cache-ref="client-cache">
</gfe:lookup-region>

在这种情况下,您需要使用

<gfe:client-region id="Region1" name="Region1" cache-ref="client-cache"/>

lookup-region与缓存对等体相关联;客户端区域用于客户端缓存。同时,修改Main.java,使其只加载cache-context.xml。

最新更新