I am trying to read byte array from mysql which is stored as BLOB into the db. I created a rest api which is based on Spring Boot and Hibernate. Everything works fine but byte[] array seems a little bit different than stored into db.
This is the byte array in database : 11,7,5
This is what hibernate gets from db :[49, 49, 44, 55, 44, 53]
This is what I see in my browser : data: "MTEsNyw1"
Here is my hibernate code
class MyData{
...
@Column(name="data",columnDefinition="BLOB")//this is what I tried but did not work!
private byte[] data;
}
And with that, I want to return data array which is 11,7,5 from Jackson Mapper. Could you help me with annotations or something useful with this?