春のモデルやモデルの属性なしでコントローラからjspに値を渡す方法は?春のモデルやモデルの属性なしでコントローラからjspに値を渡す方法は?
@RequestMapping(value = "/selectUser", method = RequestMethod.GET )
public String getTravelByUserId(@RequestParam("userId") Long theId) {
System.out.println("AdminController.getTravelByUserId");
// get travels from the service
List<Travel> travelList=travelService.getTravelByUserId(theId);
//add the user which authenticatedAdmin to the model
return "Admin/travel-list";
}
解決したい問題は何ですか?モデルマップやモデル属性を使用していないのはなぜですか? – Ralph
モデル属性 – kafkas
を削除するのを忘れた場合は、jsonとして返品することができます! – Generic