PathParam 如何设置正则表达式以允许 URL?
我使用 @PathParam ,请求格式如下:
@Path("/XXX/XXX/{testvariable:[\\\\s\\\\S]+}")
这里,testvariable 可以采用 http://google 之类的值。 com/myname.txt、191.123.122.333 或简称为包含任何特殊字符的字符串。我使用的正则表达式似乎不允许值“http://google.com/myname.txt< /a>”为此。
我收到的回复是:.没有与请求路径匹配的操作
。
I am using @PathParam and the request format is like this:
@Path("/XXX/XXX/{testvariable:[\\\\s\\\\S]+}")
Here, testvariable can take values like http://google.com/myname.txt, 191.123.122.333 or in short a String with any special characters. The regex that I used doesn't seem to allow the value "http://google.com/myname.txt" for this.
I get response saying, .No operation matching request path
.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论