java path 注解_注解@Path到底用什么用

更新

@魔鬼筋肉人 的答案提醒了我,在 Spring Boot - 27.3 JAX-RS and Jersey 小节中有提到 @Path 注解,但是并未提及它自身的作用,关于这一点请参考 @魔鬼筋肉人 的答案。

综合来看,在 Spring Boot 中使用 jax-rs 系列注解是可以得到一定的支持的。

If you prefer the JAX-RS programming model for REST endpoints, you can use one of the available implementations instead of Spring MVC. Jersey 1.x and Apache CXF work quite well out of the box if you register their Servlet or Filter as a @Bean in your application context. Jersey 2.x has some native Spring support, so we also provide auto-configuration support for it in Spring Boot, together with a starter.

你可以在这里查看 Spring Boot 关于 JAX-RS 的说明。

原答案

我在官网翻来翻去没看到 @Path,包括 Spring MVC 和 Spring Boot,方便提供一下它所在的包名吗?

因为我用 IDEA 建了个默认 SpringBoot 工程后打这个注解也是提示找不到。

它会让我去添加一个 jsonpath 的包,我觉得应该不是这个。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值