File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -205,6 +205,39 @@ val app = Javalin.create { config ->
205205{% endcapture %}
206206{% include macros/docsSnippet.html java=java kotlin=kotlin %}
207207
208+ ### Compression configuration has changed
209+ The compression API has been simplified. Instead of calling methods like ` brotliAndGzipCompression() ` , you now set the ` compressionStrategy ` property.
210+
211+ In Javalin 6:
212+ {% capture java %}
213+ var app = Javalin.create(config -> {
214+ config.http.brotliAndGzipCompression();
215+ });
216+ {% endcapture %}
217+ {% capture kotlin %}
218+ val app = Javalin.create { config ->
219+ config.http.brotliAndGzipCompression()
220+ }
221+ {% endcapture %}
222+ {% include macros/docsSnippet.html java=java kotlin=kotlin %}
223+
224+ In Javalin 7:
225+ {% capture java %}
226+ import io.javalin.compression.CompressionStrategy;
227+
228+ var app = Javalin.create(config -> {
229+ config.http.compressionStrategy = CompressionStrategy.GZIP;
230+ });
231+ {% endcapture %}
232+ {% capture kotlin %}
233+ import io.javalin.compression.CompressionStrategy
234+
235+ val app = Javalin.create { config ->
236+ config.http.compressionStrategy = CompressionStrategy.GZIP
237+ }
238+ {% endcapture %}
239+ {% include macros/docsSnippet.html java=java kotlin=kotlin %}
240+
208241### Template rendering is now modular
209242The ` javalin-rendering ` module has been split into separate modules for each template engine.
210243
You can’t perform that action at this time.
0 commit comments