简体   繁体   中英

Rest EASY Path parameter

我必须匹配不包含单词的路径,因此我的路径注释看起来像@Path(“ / {userId} / {managerId:?:CEO}”“),这意味着将所有请求传递给与此方法不匹配的方法CEO的CEO身份(Reg Expr是?:CEO。但是因为那里有一个“:”感叹,所以RestEASY框架不喜欢它。任何帮助都将是很好的。

为了转义@Path批注值中的字符,您需要在要转义的字符之前添加\\

{managerId:?\:CEO}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM