controller层:
@RequestMapping(value = "/hello",method = RequestMethod.GET)
public ModelAndView sayHi(){
return new ModelAndView("index");
}
application.yml
servlet:
#项目访问前缀
context-path: /shdemo/
将访问前缀由 /shdemo→/shdemo/