I have that class
package com.akensys.testlucas.model;
import jakarta.persistence.Entity;
import jakarta.persistence.GeneratedValue;
import jakarta.persistence.GenerationType;
import jakarta.persistence.Id;
import lombok.Data;
@Entity
@Data
public class Vetement {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private int code;
private String sku;
}
In postman i send http://localhost:8081/user/addJSON :
{
"code":1310695,
"sku":"524080012403"
}
All its okay i have the code and sku : Vetement(id=null, code=1310695, sku=524080012403)
But if my JSON looks like that :
{
"CODE":1310695,
"SKU":"524080012403"
}
And if I modify my class : code to CODE and sku to SKU It still doesn’t work
I need to keep the JSON with name in uppercase so how can i make it works and why it doesnt work ?
New contributor
CosmosFutur is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.