Got class/interface level and method mapping
@RequestMapping(value = "/post") public interface PostApi { //to get /posts @RequestMapping(value = "s") ResponseEntity getAll(); }
Basically I want to add character ‘s’ on /post and get /posts, how this is possible
Advertisement
Answer
public interface PostApi { //to get /posts @RequestMapping(value = "/posts") ResponseEntity getAll(); @GetMapping(value = "/post/{id}") ResponseEntity getById(@PathParam Long id); }