我是靠谱客的博主 任性哈密瓜,最近开发中收集的这篇文章主要介绍redis java 存储图片,如何使用java / spring将图像存储到redis,觉得挺不错的,现在分享给大家,希望可以做个参考。

概述

I'm using redis and spring framework on my image upload server. I need to store the images to redis. I have found the following question but it was for python.

how to store an image into redis using python / PIL

I'm not sure if it's the best way but I would like to know how to do it in java (preferably using spring framework). I'm using spring-data-redis which uses jedis.

I would like to know if it is a good strategy to store images in redis.

解决方案

Redis is binary safe so, in the case of Jedis, you can use BinaryJedis to store binary data just as any other kind of value that you store in Redis.

And no, I don't think storing images in Redis, and thus in-memory, is a good strategy. That would have to be a very special use-case.

最后

以上就是任性哈密瓜为你收集整理的redis java 存储图片,如何使用java / spring将图像存储到redis的全部内容,希望文章能够帮你解决redis java 存储图片,如何使用java / spring将图像存储到redis所遇到的程序开发问题。

如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。

本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
点赞(40)

评论列表共有 0 条评论

立即
投稿
返回
顶部