我能够成功运行spring-gemfire-examples-master / spring-cache项目。但是,当我尝试连接我的本地定位器时,它告诉我在GemfireCache中找不到region1。但是,我可以在Pulse中看到已建立连接。 我的步骤:
将样本文件夹中的spring-cache ... cache-context.xml更改为
相应地更改cacheManager。
以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>
答案 0 :(得分:1)
在这种情况下,您需要使用
<gfe:client-region id="Region1" name="Region1" cache-ref="client-cache"/>
lookup-region与缓存对等体相关联;客户端区域与客户端缓存一起使用。另外,相应地修改Main.java以加载cache-context.xml。