say we have a simple search mapping
accessable via 'http://domain/search?q=mySearch'Code:@RequestMapping(value = "/search", method = RequestMethod.GET) public String search(@RequestParam("q") String searchTerm) { //snipped }
this is perfectly maintainable.
however, we want to implement advanced search, where there can be large numbers of different GET vars
eg 'http://domain/search/advanced?field1=value1&field2..N=value2..valueN'
to me it seems like this could become quite a headache, in terms of maintainence and readability to have eg.
is there a way to be able to rather have something likeCode:@RequestMapping(value = "/search/advanced", method = RequestMethod.GET) public String advancedSearch(@RequestParam("field1") String field1, ..@RequestParam("fieldN") String fieldN) { //snipped }
that would allow us to still have transparent/distributable URLs?Code:@RequestMapping(value = "/search/advanced", method = RequestMethod.GET) public String advancedSearch(AdvancedSearchObject advancedSearchObject) { //snipped }
thanks in advance
shaine


Reply With Quote