add compression support. Closes #5
This commit is contained in:
parent
8c5a5159d4
commit
3f1c2de2a4
2 changed files with 12 additions and 1 deletions
|
@ -115,6 +115,7 @@ dependencies {
|
|||
compile 'com.diffplug.durian:durian:3.4.0'
|
||||
compile 'com.faendir.proguard:retrace:1.3'
|
||||
compile 'javax.xml.bind:jaxb-api:2.3.0'
|
||||
compile 'com.github.ziplet:ziplet:2.3.0'
|
||||
}
|
||||
|
||||
compileJava.dependsOn(processResources)
|
||||
|
|
|
@ -13,15 +13,19 @@
|
|||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
package com.faendir.acra.rest;
|
||||
|
||||
import com.faendir.acra.rest.multipart.Rfc1341MultipartResolver;
|
||||
import com.github.ziplet.filter.compression.CompressingFilter;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
||||
import org.springframework.lang.NonNull;
|
||||
import org.springframework.web.multipart.MultipartResolver;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
|
||||
/**
|
||||
* @author lukas
|
||||
* @since 16.05.18
|
||||
|
@ -33,4 +37,10 @@ public class RestConfiguration {
|
|||
public static MultipartResolver multiPartResolver() {
|
||||
return new Rfc1341MultipartResolver();
|
||||
}
|
||||
|
||||
@Bean
|
||||
@Order(Ordered.HIGHEST_PRECEDENCE)
|
||||
public Filter gzipFilter() {
|
||||
return new CompressingFilter();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue