java - Spring Request mapping with different parameters and one same parameter -
i have spring code there request follows :
@requestmapping(method = requestmethod.get, value = { enterpriseliterals.root_url_simple + "storedepartments/search.json", enterpriseliterals.root_url_simple + "storedepartments/search" },params = { "!dealerstoreid" }) public map<string, list<? extends abstractdepartment>> getdepartments( @requestparam(value = "enterpriseid", required = true) string enterpriseid,@requestparam(value = "responsefields", required = false) string responsefields)
and request :
@requestmapping(method = requestmethod.get, value = { enterpriseliterals.root_url_simple + "storedepartments/search", enterpriseliterals.root_url_simple + "storedepartments/search.json" },params = {"!enterpriseid"}) @responsebody public map<string, list<abstractdepartment>> getdepartmentlistbasedonstoreanddepttype(@requestparam(value = "dealerstoreid", required = true) string dealerstoreid,@requestparam(value = "responsefields", required = false, defaultvalue = "summary") string responsefields)
however, since there responsefields in both requests getting error when call above api's responsefields saying "responsefields not exist.". please solutions solve problem.
Comments
Post a Comment