Answered step by step
Verified Expert Solution
Question
1 Approved Answer
SpringBoot ( Debugging ) : Home API Environment Java version: 1 . 8 Maven version: 3 . * Spring Boot version: 2 . 3 .
SpringBootDebugging: Home API
Environment
Java version:
Maven version:
Spring Boot version: RELEASE
Data
Example of a Home data JSON object:
i d: "area": "price": prime cit y prime prime "Noida"
Requirements
In this project, home data are provided for many countries with API endpoints for fetching specific information. Note that all the data are virtual. The following REST endpoints have been implemented and all the endpoints are secured by HTTP basic authentication.
POST request to apihome:
accepts a home object without id and returns status code on creation
if the home object with id is provided, returns status code
it is secured by HTTP basic auth where username and password are 'admin' and 'admin'
GET request to apihomeid:
returns the home entry with the given id and status code
returns status code if the requested home does not exist
returns status code if the requested home id is invalid
this should be publicly accessible and should not require HTTP basic authentication
GET request to apihome:
returns all the home entries with status code
it us secured by HTTP basic auth where username and password are 'admin' and 'admin'
There are tests already written but some are failing due to bugs in the implementation of the HTTP basic security configuration. Find the bugs and fix them so that all the tests pass.
Commands
run:
mvn clean springboot:run
install:
mvn clean install
test:
mvn clean test
Software Instructions
The questions requires Java Development Kit
Install JDK on MacOS
Install JDK on Windows
Install JDK on Linux
Install Maven
Git Instructions
Use the following commands to work with this project
Run
mvn clean springboot:run
Test
mvn clean test
Install
mvn clean install
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