SpringMVC+Thymeleaf如何处理URL中的动态查询参数

1.使用一个Map<String, String>接收数据

When you request a Map annotated with @RequestParam Spring creates a map containing all request parameter name/value pairs. If there are two pairs with the same name, then only one can be in the map. So it's essentially a Map<String, String>

You can access all parameters through a MultiValueMap:

public String processGetRequest(@RequestParam MultiValueMap parameters) {

This map is essentially a Map<String, List<String>>. So parameters with the same name would be in the same list.

2.

上一篇:html5,dom操作1


下一篇:【BZOJ2331】[SCOI2011]地板 插头DP