application.properties file has been already configured MySQL related properties as follows (Just specify your id in the data source URL):
• spring.datasource.url=jdbc:mysql://172.16.12.96:3306/{yourId} (e.g. yourId=20IT001)
• spring.datasource.username=root
• spring.datasource.password=Abcd@1234
• spring.jpa.hibernate.ddl-auto=update
• spring.jpa.show-sql=true
- Create a Spring Boot rest controller named PatientController in the controllers package.
- Create an entinty class Patient with patientId, name, address fields in the entities package.
- Create a Repository PatientRecordRepository in the repositories package.
- Create an endpoint to get list of patients(/patient) (GetMapping)
- Create an endpoint to get specific patient (/patient/{patientId}) information. (GetMapping)
- Create an endpoint to add the patient record to the database. (PostMapping)
- Create an endpoint to update the patient record to the database. (PutMapping)
- Create an endpoint to delete the patient record to the database. (DeleteMapping)
Initial React JS app is created in the webapps folder. Following modules are already installed (just execute command ""npm install" before "npm start"):
• react-bootstrap (Also added the required dependancy in index.html)
• react-router
• axios
Create components to perform the operation (add, update, delete) as we have learnt in the labs.
execute following commands from the Intellij terminal root directory
git checkout -b {yourId}
git add .
git commit -m "Completed the task"
git push --set-upstream origin {yourId}