Added alive method to be monitored

This commit is contained in:
Luca Frosini 2023-04-11 10:32:14 +02:00
parent 090a5be4ed
commit 1902da7541
1 changed files with 7 additions and 0 deletions

View File

@ -1,6 +1,7 @@
package org.gcube.common.software.service.rest;
import javax.ws.rs.Consumes;
import javax.ws.rs.HEAD;
import javax.ws.rs.InternalServerErrorException;
import javax.ws.rs.POST;
import javax.ws.rs.Path;
@ -26,6 +27,12 @@ public class Software {
public static final String APPLICATION_JSON_CHARSET_UTF_8 = "application/json;charset=UTF-8";
@HEAD
public Response alive() {
return Response.status(Status.OK).build();
}
@POST
@Consumes(APPLICATION_JSON_CHARSET_UTF_8)
@Produces(APPLICATION_JSON_CHARSET_UTF_8)