@@ -82,18 +82,18 @@ public Map<String, Object> updateUserSaying(int userId, String saying){
8282``` java
8383@LoginRequired
8484@RequestMapping (path = " /updateSaying" , method = RequestMethod . POST )
85- public String updateSaying(String saying , Model model){
85+ public String updateSaying(String saying, Model model) {
8686 User user = hostHolder. getUser();
8787 Map<String , Object > map = userService. updateUserSaying(user. getId(), saying);
8888 if (map == null || map. isEmpty()) {
8989 Event event = new Event ()
9090 .setTopic(TOPIC_UPDATE )
9191 .setUserId(user. getId());
9292 eventProducer. fireEvent(event);
93- return " redirect:/index " ;
93+ return " redirect:/user/profile/ " + user . getId() ;
9494 } else {
95- model. addAttribute(" errorMsg " , map. get(" errorMsg " ));
96- return " / site/setting" ;
95+ model. addAttribute(" SayingErrorMsg " , map. get(" SayingErrorMsg " ));
96+ return " site/setting" ;
9797 }
9898}
9999```
@@ -138,9 +138,9 @@ setting:
138138 < div class= " col-sm-10" >
139139 < div class= " custom-file" >
140140 < input type= " text"
141- th: class= " |form-control ${errorMsg !=null?'is-invalid':''}|"
141+ th: class= " |form-control ${SayingErrorMsg !=null?'is-invalid':''}|"
142142 name= " saying" placeholder= " 请输入新简介!" required>
143- < div class= " invalid-feedback" th: text= " ${errorMsg }" >
143+ < div class= " invalid-feedback" th: text= " ${SayingErrorMsg }" >
144144 该账号不存在!
145145 < / div>
146146 < / div>
0 commit comments