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

Popular posts from this blog

Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12:test (default-test) on project.Error occurred in starting fork -

windows - Debug iNetMgr.exe unhandle exception System.Management.Automation.CmdletInvocationException -

configurationsection - activeMq-5.13.3 setup configurations for wildfly 10.0.0 -