我是靠谱客的博主 任性哈密瓜,这篇文章主要介绍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内容请搜索靠谱客的其他文章。

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

评论列表共有 0 条评论

立即
投稿
返回
顶部