RESTful获取url参数及直接映射pojo

1、url示例:?from=10&to=20

@QueryParam("from") int from

2、url示例:?orderBy=age&orderBy=name

@QueryParam("orderBy") List<String> orderBy

3、url示例:?age=18&name=perter

@Form User pojo
public class User {
	@QueryParam("age")
	private int age;
	@QueryParam("name")
	private String name;
......
}


你可能感兴趣的:(REST)