Json mapping error for Spring boot

1

I'm getting the msg below, when trying to map a json - Spring Boot

  JsonMappingException: Can not construct instance of javax.servlet.http.HttpServletRequest: abstract types either need to be mapped to concrete types

In the product class I added the information below (although the class is not abstract) and did not work @JsonDeserialize (as = Product.class)

BufferedReader reader = Request.getReader();        
Gson gson = new Gson();     
Produto produtos =  gson.fromJson(reader, Produto.class);

Note: Request is an HttpServletRequest

    
asked by anonymous 13.10.2017 / 04:18

0 answers