Question: Develop a backend using Spring Boot, REST API, and Spring Data JPA for following CRUD operations for Railway resource offered by an Indian Railway Railway

Develop a backend using Spring Boot, REST API, and Spring Data JPA for following CRUD operations for Railway resource offered by an Indian Railway

Railway (1) <------ > Stations (M) Bidirectional Add new Railway Delete Railway details Fetch all Railway matched by given Railway category Add station details Railway has the following Properties: ID (unique identifier for each Railway, auto generated, starts from 1) Name Category (Enum, example: Express,Shatabdi,AC,Metro) Start_time End_time Source Destiation

Station has the following Properties: Station ID(unique identifier for each Railway, auto generated, starts from 1) station_code Station_Name No_Of_Platforms Railway_Id(FK)

You have to use 1--- > * relationship to save resource. None of the fields in Railway and Station table is nullable. Create Required payloads (DTO) ID(auto generated) There should be validation on create .For example: Start_time cannot be after End_time. Name should not be blank. Rest URL should be named as per REST best practices. Response codes should be as per REST guidelines..(201 for resource creation , 404 for not found , 200 for ok) Error handling in case of failures.

Mandatory Operations: Use Suitable Annotations while creating Hib. POJO(Entity) Implementation of All CRUD operation on Railway as well as Station Payload Validations Implementation of Get Railway by given Category Proper response codes for GET & POST Centralized Error Handling Service and Repository and Entity layers Use PathVariable wherever required For Testing use Postman/Swagger

ApiRespone with string message is desirable. But even if you return a string message, it's also acceptable

Develop this app in a layered manner Rest Controller --Service --DAO --Entities --DB

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!