How to write path in Spring controllers and views

1 in view of how to write path variable

   Path written in the form tag in

1 <form action="#" th:action="@{/update/{id}(id=${user.id})}" th:object="${user}" method="post">

Of course, there is a way, is written in a label in

. 1  < P > < A the href = "/ alluser" > User List </ A > </ P >

2 controllers in how to write path variable

      One is the ordinary jump

 1 return "update-user"; 

   Another is to redirect Jump

 1 return "redirect:/allUser"; 

Guess you like

Origin www.cnblogs.com/hzyhx/p/11100426.html