複数のアクションと対応する@modelattributeメソッドを持つコントローラーがあります。メソッド出力の1つは、次のメソッドへの入力です。ただし、値が設定されることはありませんでした。デバッグしたところ、メソッドが呼び出される順序が予想とは異なることがわかりました。とにかく、コマンド名@ModelAttribute( "nominationCommand")またはメソッド名に関連していますか。何がこれを推進しますか?
@ModelAttribute("awardCommand")
public AwardCommand getAwardList(HttpServletRequest request, HttpSession session, Model model) {
@ModelAttribute("associateDetails")
public List<AssociateDetailsCommand> getAssociateList (HttpServletRequest request, HttpSession session, Model model) {
@ModelAttribute("achievementCommand")
public AchievementDetailsCommand getAchievementDetails(HttpServletRequest request, Model model) {
@ModelAttribute("departmentCommand")
public List<DepartmentCommand> getDepartmentList(HttpServletRequest request,HttpSession session, Model model) {
上記と同じ順序でメソッドを呼び出す必要があります。ただし、2番目のメソッドの前に、3番目のメソッドが呼び出されます。君の力が必要。