Using the RequestMapping annotation is one simple approach to generate seo friendly url:
For e.g.,
1.
@RequestMapping(method=RequestMethod.POST, value="/addAccount", headers="Accept=application/xml, application/json")
public @ResponseBody Account addAccount(@RequestBody Account account) {
}
The SEO friendly URL is – http://localhost:8080/myApp/addAccount
When you do a post to this url, the addAccount method is invoked.
2. For search
@RequestMapping(method=RequestMethod.GET, value="/search/{keyword}”)
public @ResponseBody SearchResults search(@PathVariable String keyword) {
}