springboot restcontroller thymeleaf page jump

thymeleaf recommends using @Controller for page jumping.

 

If you use @RestController how to perform page jump?

 

code show as below:

@RestController
@RequestMapping("rmsLogin")
public class RmsLoginController {

    @RequestMapping("login")
    public ModelAndView forwardLogin(){
        ModelAndView mv = new ModelAndView();
        mv.setViewName("rms/login");
        return mv;
    }
}

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326185488&siteId=291194637