为 asagentsalesgroup hybris 添加路径限制

Adding path restriction for asagentsalesgroup hybris

我在控制器中有一个 link,如下所示: training/{trainingCode:.}/book-training/{trainingSlot:.} 例子: /training/TRNG_DE_SPW_STAND/book-training/8797247983227 其中 TRNG_DE_SPW_STAND 和 8797247983227 是我希望在 ASM 模式下限制的动态值。

为此,我尝试添加以下 url 模式,但它似乎不起作用:

  1. POST:/training/*/book-training/**
  2. /training//book-training
  3. /training/{code}/book-training/**
  4. /book-training/**
  5. /book-training/*
  6. training/{trainingCode:.*}/book-training/**

我尝试添加模式的 spring 文件 (kbecomasm-spring.xml) 如下:

<alias name="defaultAsmSalesGroupRestrictedPathsList" alias="asmSalesGroupRestrictedPathsList" />
    <util:list id="defaultAsmSalesGroupRestrictedPathsList" value-type="java.lang.String">
        <value>/checkout/multi/summary/placeOrder</value>
        <value>POST:/my-account/submit-warranty</value>
        <value>POST:/my-account/my-core/core-submit</value>
        <!-- **/s/softwareRequest?softwareCode=Setup_ABS8_EOL.zip -->
        <value>POST:/s/softwareRequest</value>  
        <!-- **/training/TRNG_DE_SPW_STAND/book-training/8797247983227 -->
        <value>POST:/training/*/book-training/**</value> <!-- This doesn't work-->
    </util:list>

有线索吗?

POST:/training/(.*)/book-training/** 这有效!