dyc87112 / SpringBoot-Learning

《Spring Boot基础教程》,2.x版本持续连载中!点击下方链接直达教程目录!
https://blog.didispace.com/spring-boot-learning-2x/
15.7k stars 4.88k forks source link

Spring Boot 2.x基础教程:使用EhCache缓存集群 本地环境怎么部署? #61

Open maoqingcode opened 3 years ago

maoqingcode commented 3 years ago

本地环境 只更改端口 发现不生效

ehcache-1.xml

<cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="hostName=localhost,
                        port=40001,
                        socketTimeoutMillis=2000,
                        peerDiscovery=manual,
                        rmiUrls=//localhost:40002/users" />

ehcache-2.xml

  <cacheManagerPeerProviderFactory
            class="net.sf.ehcache.distribution.RMICacheManagerPeerProviderFactory"
            properties="hostName=localhost,
                        port=40002,
                        socketTimeoutMillis=2000,
                        peerDiscovery=manual,
                        rmiUrls=//localhost:40001/users" />