This project depicts how to write JUnit test cases for Spring boot REST APIs
The class StudentController.java
contains all endpoint.
AVAILABLE ENDPOINTS
method | resource | description |
---|---|---|
GET |
/getMapping |
get the collection of students -> 200(OK) |
POST |
/postMapping |
creates a student record -> 201(created) |
PUT |
/putMapping |
updates a student record -> 200(OK) |
DELETE |
/deleteMapping |
deletes a student record -> 200(OK) |
- Spring Boot
- Spring Configuration
- Spring REST Controller
- JUnit 5
- Development Tools
- This app has mockmvc for the 4 endpoints
mvn clean install
- Plain maven clean and install