Question
How to implement REST API with MySQL database for my application using Spring or any other tool according to the specification below: 1- To get
How to implement REST API with MySQL database for my application using Spring or any other tool according to the specification below:
1- To get the number of properties by property type
HTTP request:
GET /igse/propertycount
JSON Response:
[ {
"detached":"10" },
{ "semi-detached":"2"
}, {
"terraced":"2" },
{ "flat":"2"
}, ...
]
----------
2- To get energy usage statistics for a specific property type and the number of bedroom.
HTTP request:
GET ./igse/semi-detached/3
JSON Response:
{ "type":"semi-detached", "bedroom":"3", "average_electricity_gas_cost_per_day":"9", "unit":"pound"
}
-----------
Screenshots of my database:
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started