I have large text which is in String format. I would like to know how to convert that String into CLOB. I'm using Spring data JPA, Spring boot.
I have tried using
clob.setString(position, string)
I have large text which is in String format. I would like to know how to convert that String into CLOB. I'm using Spring data JPA, Spring boot.
I have tried using
clob.setString(position, string)
Without dragging the question further I want to answer it simply.
In Spring Data JPA there should be an entity which is String and needed to be saved as CLOB in DB. So, the CLOB column of entity should look like this.
Then you should have a Repository like below
Now in Service method you could do something like below
This is how the String data is saved as CLOB in DB.