How gowtham1103/restapi works
CloudGraze is a small Spring Boot REST service for storing and retrieving door-numbered usage records. A client POSTs a CloudGraze record to /post; the controller delegates saving through the service and repository. A GET to /cg.spring follows the same layers to retrieve all records. The entity defines the record fields, including time and usage totals. The excerpts show no reporting, aggregation, or database configuration; persistence beyond the Spring Data repository is therefore left unverified.
Main entry points: CgController.java REST controller · CgService.java Record service · CgRepository.java JPA repository · CloudGraze.java Usage record
Components 7
HTTP API
- Spring Boot app
src/main/java/com/gowatr/cloudgraze/CloudgrazeApplication.java - REST controller
src/main/java/com/gowatr/cloudgraze/Controller/CgController.java
Record Model
- Record service
src/main/java/com/gowatr/cloudgraze/Service/CgService.java - Usage record
src/main/java/com/gowatr/cloudgraze/Entity/CloudGraze.java
Persistence
- JPA repository
src/main/java/com/gowatr/cloudgraze/Repository/CgRepository.java - Backing database
Other components
- HTTP client
Connections 8
- HTTP client → REST controller: sends HTTP
src/main/java/com/gowatr/cloudgraze/Controller/CgController.java - REST controller → Record service: delegates requests
src/main/java/com/gowatr/cloudgraze/Controller/CgController.java - REST controller → Usage record: accepts and returns
src/main/java/com/gowatr/cloudgraze/Controller/CgController.java - Record service → JPA repository: reads and saves
src/main/java/com/gowatr/cloudgraze/Service/CgService.java - Record service → Usage record: handles records
src/main/java/com/gowatr/cloudgraze/Service/CgService.java - JPA repository → Usage record: persists type
src/main/java/com/gowatr/cloudgraze/Repository/CgRepository.java - Spring Boot app → REST controller: hosts routes
- JPA repository → Backing database: persists records