[英]match all urls except urls with “static” word
我有这个 URL 匹配
get("/portal/*", (req, res) -> { Map<String, Object> model = new HashMap<>();
return new VelocityTemplateEngine().render(
new ModelAndView(model, "../../portal/index.html")
);
});
所有网址如:
/portal/
/portal/orders
/portal/orders/123
/portal/foo/bar
应该返回 index.html。 它有效,但我需要跳过 static 资源。 而且我不知道该怎么做。 像这样的东西:
“/portal/{not word static}/*” - 换句话说,这个 URL 不应该被处理: /portal/static/css/main.css
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.