How speriyasamyind/spring-boot-lcs works
This is a small Spring Boot REST service for finding the longest common substring. Its documented user workflow is to submit inputs through REST or Swagger UI and receive a result; the README also advertises Actuator health and info endpoints. The source excerpts do not include application code, so internal dispatch and data-flow links are shown only as unverified dashed edges, rather than inferred as fact.
Main entry points: LcsController.java LCS endpoint · AppExceptionHandler.java Exception handler · LcsService.java LCS service · SwaggerConfig.java Swagger config
Components 11
Application and API
- Spring Boot app
src/main/java/com/example/lcs/LcsApplication.java - LCS endpoint
src/main/java/com/example/lcs/controller/LcsController.java - Request DTO
src/main/java/com/example/lcs/dto/LcsInput.java - Response DTO
src/main/java/com/example/lcs/dto/LcsOutput.java - Application exception
src/main/java/com/example/lcs/exception/AppException.java - Exception handler
src/main/java/com/example/lcs/exception/AppExceptionHandler.java - Error detail DTO
src/main/java/com/example/lcs/dto/ExceptionDetail.java
Substring computation
- LCS service
src/main/java/com/example/lcs/service/LcsService.java
API discovery and operations
- Swagger config
src/main/java/com/example/lcs/config/SwaggerConfig.java - Actuator endpoints
src/main/resources/application.properties
Other components
- API user
Connections 9
- API user → LCS endpoint: submits REST request
README.md - LCS endpoint → Request DTO: accepts input
- LCS endpoint → LCS service: invokes
- LCS service → Response DTO: produces result
- API user → Swagger config: opens Swagger UI
README.md - Swagger config → LCS endpoint: documents API
- Spring Boot app → Actuator endpoints: exposes health and info
README.md - Exception handler → Error detail DTO: formats errors
- Exception handler → Application exception: handles