Merge pull request #3571 from stianst/KEYCLOAK-3889

KEYCLOAK-3889 Add produces to server info endpoint
This commit is contained in:
Stian Thorgersen 2016-12-01 06:36:12 +01:00 committed by GitHub
commit 7c0f6f6e6e

View file

@ -56,8 +56,10 @@ import org.keycloak.theme.Theme;
import org.keycloak.theme.ThemeProvider;
import javax.ws.rs.GET;
import javax.ws.rs.Produces;
import javax.ws.rs.WebApplicationException;
import javax.ws.rs.core.Context;
import javax.ws.rs.core.MediaType;
import java.io.IOException;
import java.util.Collections;
import java.util.Comparator;
@ -83,6 +85,7 @@ public class ServerInfoAdminResource {
* @return
*/
@GET
@Produces(MediaType.APPLICATION_JSON)
public ServerInfoRepresentation getInfo() {
ServerInfoRepresentation info = new ServerInfoRepresentation();
info.setSystemInfo(SystemInfoRepresentation.create(session.getKeycloakSessionFactory().getServerStartupTimestamp()));