I have a JSON request like below and i want to attach my file i-e (pdf,jpeg,png,etc) as part of JSON Request Body Like below. How would i do that in spring boot REST API.? My request Body is :
{
"data":{
"caseCategoryPrefix":"PF",
"caseNumber":"last name",
"caseStatusId":1,
"caseCategoryId":1,
"caseAttachments":[
{
"caseAttachmentId":1,
"attachmentTypeId":1,
"createdBy":"abc",
"file":"" // here i want to attach my file
}
]
}
}