Spring boot项目跳转jsp页面实现 遇到的问题
## Spring boot项目跳转jsp页面实现 遇到的问题
- 引用了spring-boot-starter-thymeleaf包 ,要注释掉
- Controller类跳转方法
以前使用 :跳转index页面变成显示“index”字符串
@RequestMapping(value="/home")
public String home(){
System.out.println("redirect to home page!");
return "index";
}
修改后:
@RequestMapping(value="/index")
public ModelAndView index(){
ModelAndView mv = new ModelAndView();
mv.setViewName("hello");
return mv;
}