Skip to content

Latest commit

 

History

History
46 lines (39 loc) · 1.62 KB

HELP.md

File metadata and controls

46 lines (39 loc) · 1.62 KB

Setup

Reference Documentation

  • Initialize with Spring Initlzr. Web based REST API. Download the zip and copy the contents into the repo root directory., Update Maven Project, Restart eclipse. (old version displays an X sign, nothing in the problems tab)

  • Sin Numbers are not managed my this app. So, this API is an RPC API no need to create a Representation Class of a resource:sin However, we need classes for API responses. Class=>JSON conversion will be done by Spring. (Jackson, if accept header is json) / class ValidationRPCResponse{ private int validationResult; public ValidationRPCResponse(int validationResult) { super(); this.validationResult = validationResult; } public int getValidationResult() { return validationResult; } public void setValidationResult(int validationResult) { this.validationResult = validationResult; } }

  • Test with curl -X POST -F 'sin=123456781' -F 'caller=web' http://localhost:8080/validate

  • Add Actuator Dependency:

    org.springframework.boot spring-boot-starter-actuator io.micrometer micrometer-registry-prometheus

    Goto application.properties and add:

    management.endpoints.web.exposure.include=health,info,prometheus management.health.diskspace.enabled=false management.health.ping.enabled=false management.health.datasource.enabled=false management.endpoint.health.show-details=always

*Test actuator curl http://localhost:8080/actuator/health/