Skip to content

Instantly share code, notes, and snippets.

Avatar

Benoit Devos benoitdevos

View GitHub Profile
@benoitdevos
benoitdevos / WebConfig.java
Last active Mar 19, 2022
Adding support for application/octet-stream in RestController (Spring Boot) - java version
View WebConfig.java
package mycompany.myappp.config;
import org.apache.commons.io.IOUtils;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpInputMessage;
import org.springframework.http.HttpOutputMessage;
import org.springframework.http.MediaType;
import org.springframework.http.converter.AbstractHttpMessageConverter;
import org.springframework.http.converter.HttpMessageConverter;
import org.springframework.http.converter.HttpMessageNotReadableException;