I have found that you can also work around the type erasure issue by using an array as the @RequestBody instead of a collection. For example, the following would work:
public @ResponseBody String executeActions(@RequestBody ActionImpl[] actions) { //... }
More Related Contents:
- JsonMappingException: could not initialize proxy – no Session
- Spring @ResponseBody Jackson JsonSerializer with JodaTime
- How do I POST JSON data with cURL?
- Spring MVC Multipart Request with JSON
- Spring MVC – How to return simple String as JSON in Rest Controller
- How does the Spring @ResponseBody annotation work?
- Spring MVC – HttpMediaTypeNotAcceptableException
- Custom HttpMessageConverter with @ResponseBody to do Json things
- Serializing enums with Jackson
- Spring Security and JSON Authentication
- Jackson 2.0 with Spring 3.1
- Parsing JSON in Spring MVC using Jackson JSON
- How do I obtain the Jackson ObjectMapper in use by Spring 4.1?
- JPA Transient Annotation and JSON
- Why does RestTemplate not bind response representation to PagedResources?
- JSON parse error: Can not construct instance of java.time.LocalDate: no String-argument constructor/factory method to deserialize from String value
- Spring, Jackson and Customization (e.g. CustomDeserializer)
- Spring REST service: retrieving JSON from Request
- Spring 3.0 making JSON response using jackson message converter
- Unable to find a MessageBodyReader of content-type application/json and type class java.lang.String
- Why does Jackson 2 not recognize the first capital letter if the leading camel case word is only a single letter long?
- Modify default JSON error response from Spring Boot Rest Controller
- Spring-MVC 406 Not Acceptable instead of JSON Response
- include class name in all objects serialized by jackson
- Spring MVC PATCH method: partial updates
- What is “406-Not Acceptable Response” in HTTP?
- Using GZIP compression with Spring Boot/MVC/JavaConfig with RESTful
- POST request via RestTemplate in JSON
- Cannot deserialize instance of object out of START_ARRAY token in Spring Webservice
- Spring RequestMapping for controllers that produce and consume JSON