A simple Rest endpoint using Java, Springboot, JPA, Junit and Mockito.
Feature -Simple CRUD App for courses
Tech Stack: Java, Springboot, JPA, Rest Endpoint, Junit-Mockito
Main Directory Structure:
In the source directory the java classes have been organised based on the functionality of the classes. The controller have the controller class which contains the rest endpoints, the repository folder holds the repository class which extends the JPA repository and so on. Here is a snapshot of the directory structure:
WorkFlow
- Request is received in the rest endpoint, the request is validated with annotations in the model class.
- If a valid request is received, it will be forwarded to the service class.
- The service class calls the repository class to perform DB action, based on DB response it will either give you a status-200 response or "NoRecordFound" exception.