2
tuckey.web.filters.urlrewrite.UrlRewriteFilter`改寫,但春天urlrewrite
<urlrewrite>
<rule>
<from>^/ms-office$</from>
<to>/office</to>
</rule>
<rule>
<from>/ms-office/(^[0-9]+$)</from>
<to>/office/eidt?id=$1</to>
</rule>
</urlrewrite>
,當我進入ms-office/10
一個獲得WARNING: No mapping found for HTTP request with URI [/s-mvc/ms-office/10] in DispatcherServlet with name 'config'
我沒有看到這與Spring有什麼關係,但它看起來像在你的元素中有一個錯字。我想這應該是:/ office/edit/id = $ 1 –
CodeChimp
第二個'from'應該匹配'/ ms-office/10'還是'/ whatever/ms-office/10'?如果第一個,那麼你錯過了第一個規則中的^^anchor。 – Tom
@Tom發表評論,以便我接受 –