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.

原文地址:https://www.cnblogs.com/hyl8218/p/5892808.html