问题:

JAX-RS 如何获取所有post form key-value 对

@FormParam 只能一个一个指定,

我们的参数的可变化的多个

 

jersey 2.22

 

解决:

注入 javax.ws.rs.core.MultivaluedMap

 

*使用 @Context HttpServletRequest.getParameterMap ,不行query 中的可以取到但是post 取不到

 

 

参考:

https://jersey.java.net/documentation/latest/media.html

9.3.3.1. Injecting and returning the MultiPart entity

 

发表评论

电子邮件地址不会被公开。