JAX-RS: case-insensitive paths

馋奶兔 提交于 2019-12-06 10:00:58

i don't know resteasy, but if it supports all java regex syntax, you could use (?i:message) instead of your pattern.

If you really need to make the api case-insensitive and you're using Apache on the front-end of your site, consider doing it outside of code: define your API with the urls all lowercase and use Mod-Rewrite to change the urls to lowercase when they hit the web server no matter what the client actually sent. This blog post describes how to do this.

Also, the next pattern is working for me:

@Path("/{externalorders: (?i)externalorders}")
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!