use of io.confluent.ksql.rest.entity.SchemaMapper in project ksql by confluentinc.
the class KsqlRestApplication method configureBaseApplication.
@Override
public void configureBaseApplication(Configurable<?> config, Map<String, String> metricTags) {
// Would call this but it registers additional, unwanted exception mappers
// super.configureBaseApplication(config, metricTags);
// Instead, just copy+paste the desired parts from Application.configureBaseApplication() here:
ObjectMapper jsonMapper = getJsonMapper();
new SchemaMapper().registerToObjectMapper(jsonMapper);
JacksonMessageBodyProvider jsonProvider = new JacksonMessageBodyProvider(jsonMapper);
config.register(jsonProvider);
config.register(JsonParseExceptionMapper.class);
// Don't want to buffer rows when streaming JSON in a request to the query resource
config.property(ServerProperties.OUTBOUND_CONTENT_LENGTH_BUFFER, 0);
if (isUiEnabled) {
loadUiWar();
config.property(ServletProperties.FILTER_STATIC_CONTENT_REGEX, "/(static/.*|.*html)");
}
}
Aggregations