开发者

How to expose Blob (Image) data via REST webservice

开发者 https://www.devze.com 2023-02-10 18:14 出处:网络
I\'m storing image开发者_JAVA技巧s in blob form in a MySql database table.I need to expose these images via a REST webservices and was wondering what my options are.The main option I see is to read th

I'm storing image开发者_JAVA技巧s in blob form in a MySql database table. I need to expose these images via a REST webservices and was wondering what my options are. The main option I see is to read the database, create the image and store it on the filesystem and send the path to the image in the REST response. Any other ideas here? I'm thinking I will use RESTeasy for my JAX-RS implementation. Thanks for the help!


You can parse your image into bytes and then can send those bytes in JSON form via web service.

0

精彩评论

暂无评论...
验证码 换一张
取 消