I am implementing a HttpMessageConverter and when I invoke the endpoint Spring Boot call AbstractJackson2HttpMessageConverter instead mine.
I am using Spring Boot 2.7.6.
The endpoint:
public DocumentId createDocument(List<File> files)
The WebConfig according with Spring Documentation (I can confirm that Spring run this method):
@Configuration(proxyBeanMethods = false)
public class WebConfig {
@Bean
public HttpMessageConverters customConverters() {
HttpMessageConverter<?> additional = new FileHttpMessageConverter();
return new HttpMessageConverters(additional);
}
}
The HttpMessageConverter:
@Component
public final class FileHttpMessageConverter extends AbstractHttpMessageConverter<File> {
I already changed the AbstractHttpMessageConverter type to Collection<File> and doesn't work too.
Any idea what I might be doing wrong?
Thanks in advance.