java - I have to show the all values in lookup tables values as dropdown in UI I am using hibernate session query and I am storing in cache
问题描述
But the cache is not storing values its querying each Tuple(line) of database which is even worse than implementing cache I have done this steps
- Marking entity as
@Cachable
and@Cache(read only , my region)
- and session(set
Cachable = true
) - In hibernate configuration I have set use query
cache= true
- I am using
ehcache
I want all the my POJO objects from the database table using cache someone please help me Thanks in advance
解决方案
这可能是由多种原因引起的,首先,您是否在配置 XML 文件中配置查询缓存(女巫是纯 Hibernate 项目中的 hibernate.cfg.xml 或 JPA 项目中的 persistence.xml)
推荐阅读
- javascript - 如何使用基于另一个列表框的选定项目更改列表框内容的java将javascript代码添加到pdf
- python - 如何使用 PyQt5 保存任何文件?
- javascript - 重叠剪裁问题
- r - ggplot2 直方图沿 x 轴有实线,没有值
- javascript - 如何切换标签导航
- mongodb - MongoDB 没有启动
- apl - 如何查看 APL 中的两个值是否不相等?
- javascript - 如何制作 if 语句以禁用选择选项?
- javascript - 我想将剃刀语法转换为逗号形状“”,这样我就可以使用 jquery 动态呈现 div
- visual-studio - 程序 iisexpress.exe' 已退出,代码为 0