Getting nearly double the length when reading byte[] from postgres with jpa

后端 未结 5 728
夕颜
夕颜 2021-01-06 11:50

I have an Image class that has a byte[] to contain the actual image data. I\'m able to upload and insert the image just fine in my webapp. When I attempt to display the im

5条回答
  •  栀梦
    栀梦 (楼主)
    2021-01-06 12:16

    In PostgreSQL 9 byte[] is sent to client using hex encoding.

    If this is reason for error you have to find update for JPA. Or you may change config of DB server but previous is better.

提交回复
热议问题