首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何使用spring boot在ehcache3中存储键和值

如何使用spring boot在ehcache3中存储键和值
EN

Stack Overflow用户
提问于 2019-07-03 21:50:51
回答 1查看 57关注 0票数 0

我想使用springboot将键和值存储在ehcache3中。我希望将键存储为" passportNumber“,将值存储为"name”,类似于java中的Hashmap,然后在缓存之后,如何从passportNumber中检索值。

我是ehcache-3新手,我需要一些代码。我没有在这个网站上找到任何例子,也没有通过谷歌搜索它。

EN

回答 1

Stack Overflow用户

发布于 2019-07-03 22:35:45

不要使用Ehcache3.x,因为许多功能只需付费一次即可使用。最好使用低于ehcache 3.x的版本。

阅读此文档以了解Ehcache - Spring实现:

代码语言:javascript
复制
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:

代码语言:javascript
复制
https://www.ehcache.org/documentation/2.8/configuration/configuration.html

ehcache + Spring Boot有很多示例。请搜索一下。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56871682

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档