我想使用springboot将键和值存储在ehcache3中。我希望将键存储为" passportNumber“,将值存储为"name”,类似于java中的Hashmap,然后在缓存之后,如何从passportNumber中检索值。
我是ehcache-3新手,我需要一些代码。我没有在这个网站上找到任何例子,也没有通过谷歌搜索它。
发布于 2019-07-03 22:35:45
不要使用Ehcache3.x,因为许多功能只需付费一次即可使用。最好使用低于ehcache 3.x的版本。
阅读此文档以了解Ehcache - Spring实现:
https://www.ehcache.org/documentation/2.8/integrations/spring.html阅读此文档,了解如何在java中使用ehcache:
https://www.ehcache.org/documentation/2.8/code-samples.html#using-caches
阅读此文档了解如何配置ehcache:
https://www.ehcache.org/documentation/2.8/configuration/configuration.htmlehcache + Spring Boot有很多示例。请搜索一下。
https://stackoverflow.com/questions/56871682
复制相似问题