其他分享
首页 > 其他分享> > Error resolving template [index], template might not exist or might not be accessible by any of the

Error resolving template [index], template might not exist or might not be accessible by any of the

作者:互联网

Error resolving template [index], template might not exist or might not be accessible by any of the configured Template Resolvers

解析模板 [index] 时出错,模板可能不存在或可能无法被任何已配置的模板解析器访问

这里的问题是index没有被找到,我检查了一下,是index的路径写错了


@Controller
public class shrioController {
    @RequestMapping({"/","/index"})
    public String toIndex(Model model){
        model.addAttribute("msg","hello,Shiro");
        return "index";
    }
}

image
这里的index路径应该为“/templates/index”

标签:accessible,index,configured,template,might,模板
来源: https://www.cnblogs.com/luoking/p/16029776.html