diff options
author | 2018-06-25 13:59:31 -0400 | |
---|---|---|
committer | 2018-07-10 23:45:29 -0400 | |
commit | 9eee6ac9daa5b82946b4f7c7eaa817ae3e1f4cab (patch) | |
tree | c92bf95da779589a1162044b4f77a51876fccb7b /reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java | |
parent | 9aaa8f39949d7dc3d66888797951a20a7bced145 (diff) |
logging library use and k8s
Change-Id: I264f6dd5270543a216612c50fd5806458e0e806a
Issue-ID: LOG-135
Signed-off-by: Michael O'Brien <frank.obrien@amdocs.com>
Diffstat (limited to 'reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java')
-rw-r--r-- | reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java b/reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java index 33e3874..bcc4efb 100644 --- a/reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java +++ b/reference/logging-demo/src/main/java/org/onap/demo/logging/RestHealthServiceImpl.java @@ -21,16 +21,21 @@ package org.onap.demo.logging; import javax.inject.Inject; +import javax.servlet.http.HttpServletRequest; import javax.ws.rs.GET; import javax.ws.rs.Path; import javax.ws.rs.Produces; import javax.ws.rs.core.Application; +import javax.ws.rs.core.Context; import javax.ws.rs.core.MediaType; import org.springframework.beans.factory.annotation.Qualifier; @Path("/health") public class RestHealthServiceImpl extends Application { + + @Context private HttpServletRequest servletRequest; + @Inject @Qualifier("daoFacade") private ApplicationServiceLocal applicationServiceLocal; @@ -39,7 +44,8 @@ public class RestHealthServiceImpl extends Application { @Path("/health") @Produces(MediaType.TEXT_HTML) public String getHealth() { - return applicationServiceLocal.health().toString(); + + return applicationServiceLocal.health(servletRequest).toString(); } } |