CombinedResourceHandler 排除的资源无法识别具有查询字符串的资源

CombinedResourceHandler excluded resources doesn't recognize resources with query string

我有几个 CSS 文件不想合并,但我也想破坏这些资源的缓存,所以我声明它们:

<h:outputStylesheet name="css/styles.css?version=#{startup.time}" />

在我添加 CombineResourceHandler 之前一切正常。现在新的处理程序不识别资源的名称,我不能使用通配符来排除这些资源,例如:

<context-param>
    <param-name>org.omnifaces.COMBINED_RESOURCE_HANDLER_EXCLUDED_RESOURCES</param-name>
    <param-value>css/styles.css*</param-value>
</context-param>

如果删除版本参数,我必须对这些文件进行版本控制,这是我想避免的事情。

关于如何以最简单的方式实现这一点有什么想法吗?

OmniFaces 通过内部 ResourceIdentifier class. It didn't take into account any query strings, path parameters nor path fragments. As per this commit, this has been fixed. The fix is available in today's latest 2.2-SNAPSHOT.

识别资源

在排除(和抑制)资源上下文参数中支持通配符模式将是 feature request 的一个很好的候选者。