private ObjectMapper getJson(Environment env) {
return env.getObjectMapper();
}
private int getHttpPort(Configuration config) {
ServerFactory serverFactory = config.getServerFactory();
if (!(serverFactory instanceof DefaultServerFactory)) {
throw new IllegalStateException("Server factory is not an instance of DefaultServerFactory");
}
List<ConnectorFactory> connectors = ((DefaultServerFactory) serverFactory).getApplicationConnectors();