Yes, starting with Jersey 2.0 you can use the @BeanParam
annotation to wrap a bunch of parameters in a Java bean. Example:
public class CustomerDetails {
@FormParam("custNo")
public int customerNumber;
@FormParam("whatevs")
public String whatever;
}
public Customer getDetails(@BeanParam CustomerDetails customer) {
// ...
}
Documentation: https://jersey.java.net/apidocs/2.6/jersey/javax/ws/rs/BeanParam.html
Related question: How do you map multiple query parameters to the fields of a bean on Jersey GET request?