当参数值包含“.”时,Liferay Friendly URL 无法识别(period/dot)

Liferay Friendly URL not recognized when parameter value includes "." (period/dot)

我有以下友好的URL路线:

<route>
    <pattern>/version/{version}</pattern>
    <implicit-parameter name="_facesViewIdRender">/WEB-INF/views/portletViewMode.xhtml</implicit-parameter>
    <implicit-parameter name="p_p_lifecycle">0</implicit-parameter>
    <implicit-parameter name="p_p_mode">view</implicit-parameter>
    <implicit-parameter name="p_p_state">normal</implicit-parameter>
</route>

但是当我尝试导航到以下 url 时它不起作用:

localhost:8080/web/guest/home/-/my-portlet/version/1.0

The default pattern Liferay uses to match parameters is "[^/\.]+"。此模式不包括 "/""\""."。您应该设置一个仅排除 "/""\" 的自定义模式:"[^/\]+":

<pattern>/version/{version:[^/\]+}</pattern>