I work in a REST web service. I looked through several blogs, and there I saw a method for matching URLs, they used different annotations. Some places use @RequestMapping , and some places use @Path . How do they differ from each other?
@RequestMapping
@Path
It depends on the structure that the web service creates.
@RequestMapping - annotation used as part of Spring https://spring.io/guides/gs/rest-service/
@Path is the annotation used as part of the JAX-RS API implementation, such as Jersey https://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2001
If you want to know which one is better, this section may help.