My company has asked me to do a small project in Java Spring and I have never programmed in Spring nor Java before, so I am a bit lost.
I have been asked to make a series of endpoints, seeing the documentation does not seem difficult, where I find the difficulty is that I always receive as input a JSON
with several key-value pairs, and with that, I have to search in an Oracle
database using Hibernate
and return another JSON
with other key-value pairs.
Example:
Input:
{
"client_id": 123,
"shop_id": 22,
"id_contract": 233
}
Output:
{ "loan": "70%"
"percentage_point": "80%"
}
My question is, should I do it through a POST
method? Is the output a status 200? How do I get from JSON
, for example, the client id to map it in the database with hibernate
/ Spring
?
Any advice will be welcome, even if it is simply articles, etc.