In the controller , i have this code, somehow, i want to get the request Mapping value \"search\". How is it possible ?
@RequestMapping(\"/search/\")
publ
It seems you are looking for the path that this request has matched, then you can directly get it from servlet path
@RequestMapping("/search/")
public Map searchWithSearchTerm(@RequestParam("name") String name, HttpServletRequest request) {
String path = request.getServletPath();
// more code here
}