Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何获得名称如 grails 的参数?IE。id_1,id_2。. . 等等。 groovy 或 grails 中是否有类似 params.['id_*'] 的东西?
To get the list of ids for example starting with "id_" you can do this:
"id_"
def map=[id_1:1,id_2:2,max:1,offset:2] def fparms=map.findAll{it.key.startsWith("id_")} assert fparms==[id_1:1, id_2:2]