【发布时间】:2014-03-21 03:07:23
【问题描述】:
我是这个领域的新手,我在 gridfs 中添加了一些图像。现在我想在 html 页面上显示所有这些图像。我已使用以下代码从 mongodb 检索图像。
Query query = new Query(where("filename").is("file"));
List<GridFSDBFile> images = gridFsTemplate.find(query);
model.addAttribute("images",images");
它给了我所有的图像,现在我不知道如何在 html 页面上显示这些图像。我正在使用速度模板。
#foreach($image in $images)
//code for image
#end
【问题讨论】:
标签: spring mongodb gridfs gridfs-stream