Example usage for org.springframework.boot.web.embedded.undertow UndertowCompressionConfigurer configureCompression

List of usage examples for org.springframework.boot.web.embedded.undertow UndertowCompressionConfigurer configureCompression

Introduction

In this page you can find the example usage for org.springframework.boot.web.embedded.undertow UndertowCompressionConfigurer configureCompression.

Prototype

static HttpHandler configureCompression(Compression compression, HttpHandler httpHandler) 

Source Link

Document

Optionally wrap the given HttpHandler for HTTP compression support.

Usage

From source file:org.springframework.boot.web.embedded.undertow.UndertowServletWebServer.java

private HttpHandler getContextHandler(HttpHandler httpHandler) {
    HttpHandler contextHandler = UndertowCompressionConfigurer.configureCompression(this.compression,
            httpHandler);/*w  w w  .  j av a  2s. c om*/
    if (StringUtils.isEmpty(this.contextPath)) {
        return contextHandler;
    }
    return Handlers.path().addPrefixPath(this.contextPath, contextHandler);
}