I am trying to expose a custom endpoint which internally calls spring actuator. but i am getting Read timed out; nested exception is java.net.SocketTimeoutException: Read timed out.
@GetMapping(value = "/${spring.application.name}/actuator/health")
public ResponseEntity<Object> createUser() {
ResponseEntity<Map> entity = this.restTemplate.getForEntity("http://localhost:" + this.port
+ "/actuator/health", Map.class);
return new ResponseEntity<>(entity, HttpStatus.OK);
}
Is there any way to make it work.