对于包含俄语文本的传入请求,我需要具有WebFilter。过滤条件匹配
https://application.com/deleted
但不是
https://application.ru/удалено
我也尝试提供编码后的字符串作为模式,但是它不起作用。怎么做对?
在保持网址“可读”的同时有可能吗?
提前谢谢!
@WebFilter(
urlPatterns = {
"/deleted/*", //EN
"/удалено/*", //RU, does not match
"/%D1%83%D0%B4%D0%B0%D0%BB%D0%B5%D0%BD%D0%BE/*"
//RU, encoded using URLEncoder.encode("удалено", java.nio.charset.StandardCharsets.UTF_8.toString())
}
)
public class UrlRewriteFilter implements Filter {
//...
}