Skip to content

Commit

Permalink
Use commons multipart resolver for compression compat. Fixes #233
Browse files Browse the repository at this point in the history
  • Loading branch information
F43nd1r committed Apr 8, 2021
1 parent ba12485 commit 8a74973
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,16 @@ 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.web.multipart.MultipartResolver
import org.springframework.web.multipart.commons.CommonsMultipartResolver
import javax.servlet.Filter

@Configuration
class RestConfiguration {
@Bean
@Order(Ordered.HIGHEST_PRECEDENCE)
fun gzipFilter(): Filter = CompressingFilter()

@Bean
fun multipartResolver(): MultipartResolver = CommonsMultipartResolver()
}

0 comments on commit 8a74973

Please sign in to comment.