java - Is it possible to extract a map AND separate variables from URL parameters using Spring MVC? -


public string mymethod(@requestparam string param1, @requestparam string param2, @requestparam map<string, string> map) 

this i'm doing right now. doesn't work though, because param1 , param2 present in map. there way around this? i'm using here, if it's of help.

spring matrix variables may obtained in map. need send url params below.

// url : /owners/42;q=11;r=12/pets/21;q=22;s=23    @requestmapping(value = "/owners/{ownerid}/pets/{petid}", method = requestmethod.get)  public void findpet(     @matrixvariable map<string, string> matrixvars,     @matrixvariable(pathvar="petid"") map<string, string> petmatrixvars) {      // matrixvars: ["q" : [11,22], "r" : 12, "s" : 23] // petmatrixvars: ["q" : 11, "s" : 23] 

}

for more info refer: http://docs.spring.io/spring-framework/docs/3.2.x/spring-framework-reference/html/mvc.html#mvc-ann-matrix-variables


Comments

Popular posts from this blog

Spring Boot + JPA + Hibernate: Unable to locate persister -

go - Golang: panic: runtime error: invalid memory address or nil pointer dereference using bufio.Scanner -

c - double free or corruption (fasttop) -