Multipart Configuration for JBoss Enterprise Application Platform/Application Server

Spring REST controller on Spring Boot (1.12) was not accepting multi-part requests for file upload on JBoss EAP/AS but working on Embedded Tomcat. org.springframework.web.bind.MissingServletRequestParameterException: Required MultipartFile parameter ‘file’ is not present I needed to add a multipart filter on my web xml configuration in Java @Configuration @ComponentScan @EnableAutoConfiguration @EnableJpaRepositories @EnableSpringDataWebSupport public class Application extends SpringBootServletInitializer… Read More Multipart Configuration for JBoss Enterprise Application Platform/Application Server

Apache Avro JSON Decoder for List/Array of Avro Objects

I couldn’t find a good example of decoding a JSON string that’s a list/array of Avro objects on the web. I just wanted to write a post to say that it works. Here’s a few high level things that I remember Create a JSON Decoder with Schema.createArray({avroObject}.getSchema()) When initializing the data reader, use List<{avroObject}> and… Read More Apache Avro JSON Decoder for List/Array of Avro Objects

Java Generics JSON Unmarshalling Using Jackson via Jersey Resource

Jackson seems to unmarshal properly for objects with a specific class type.  For types with generics, for example List<Element>, I could only specify the List.class, and the Element JSON was unmarshalled as LinkedHashMaps instead of the Element.class. I found a way to work around it and applied it to the Jersey use case for my… Read More Java Generics JSON Unmarshalling Using Jackson via Jersey Resource

Custom Headers on Preflight Request for HTTP Method OPTIONS

I spent a few hours on this, it looks like we can’t add custom headers on a preflight request.  We’re using JQuery/Backbone/Marionette, and some of the cross origin requests (HTTP POST and GET with custom headers) are causing a preflight request to happen. Apparently the preflight requests are generated by the browser, and we can’t… Read More Custom Headers on Preflight Request for HTTP Method OPTIONS