@Path是在实现JAX-RS API的框架(例如Jersey)中使用的注释 https://jersey.java.net/documentation/latest/jaxrs-resources .html#d0e2001 如果您想知道哪个更好,请本主题可能有帮助I am working in REST webservice. I was going through some blogs and there I saw for mapping of URL to a method, they used different annotations.Some places used @RequestMapping and some places used @Path. How does both differ? 解决方案 It depends on the framework that creates the Web service@RequestMapping is an annotation used in Spring frameworkhttps://spring.io/guides/gs/rest-service/@Path is an annotation used in frameworks implementing JAX-RS API, such as Jerseyhttps://jersey.java.net/documentation/latest/jaxrs-resources.html#d0e2001If you want to know which one is better, this topic may help 这篇关于REST Web服务中@Path和@Requestmapping之间的区别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
09-26 03:09