Implemented RESTful api for GET/POST/PUT/DELETE 4 web services, the passing data format is JSON or parameters.
GET feature lets the user can search for a student who is taking what courses and its information by student Id, or a course is taking by whom by course id, or search for all students/courses/timetables' records.
POST feature allows the user to add student/course/timetable records.
DELETE feature allows the user to delete single row of records or wipe out all records.
PUT feature allows the user to update records by thier relevant Id.
Example URL:
http://localhost:8080/system/students/all
http://localhost:8080/system/students/add
http://localhost:8080/system/students/search/{sid}
http://localhost:8080/system/students/del
http://localhost:8080/system/students/update
http://localhost:8080/system/students/update/name?sid=xx&sname=xx
https://github.com/GuoZhihong/StudentCourse/tree/master
1.replaced JDBC with Spring Data Jpa,which will automatically create tables,some feature used own sql sentences or query methods .
2.improved code similicity with lombok anotations.
3.added some atributes in some tables.
4.table_student_course table's primary key now is a composite primary key with student id and course id from those tables.
5.table_student_course table now only can update time atribute because its student id and course id now is a composite primary key from table student/course.
- added a redirected interceptor to intercept invalid URL like http://localhost:8080/xxx or http://localhost:8080/system/students/xxx.
- added a Record filter to filter requiring of the invalid records.
- built a homepage for redirection of invalid URL and forwarding to the correct URL
- A simple UI for a few requests (incomplete).