MVC アプリケーション内でクリーンな URL マッピングを構築しようとしていますが、次のような一般的な URL がたくさん見つかりました。
/SITE/{city}-{language}/user/{userId}
@RequestMapping(value = "/{city}-{language}/user/{userId}", 
         method = RequestMethod.GET)
public String user(@PathVariable String city, 
                   @PathVariable String language, 
                   @PathVariable String userId, 
                   Model model) {}
/SITE/{city}-{language}/comment/{userId}-{commentId}
@RequestMapping(value = "/{city}-{language}/comment/{userId}-{commentId}",
         method = RequestMethod.GET)
public String comment(@PathVariable String city,
                      @PathVariable String language, 
                      @PathVariable String userId,
                      @PathVariable String commentId, 
                      Model model) {}
フィルターの @PathVariable の代わりに、都市と言語を自動的にモデルに自動バインドする方法はありますか? @RequestMapping 関数のパラメーター数を減らすので、そうすると思います。