出错提示:

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.thymeleaf.exceptions.TemplateInputException: Error resolving template [/admin/index], template might not exist or might not be accessible by any of the configured Template Resolvers] with root cause

解决方案:

之前的:

modelAndView.setViewName("/admin/index");

应该改成

modelAndView.setViewName("admin/index");

去掉/就可以正常路由了。

相关文章:

  • 2022-12-23
  • 2022-01-12
  • 2022-12-23
  • 2021-06-14
  • 2021-11-02
  • 2021-07-01
  • 2022-12-23
  • 2021-09-27
猜你喜欢
  • 2021-08-02
  • 2022-02-28
  • 2022-12-23
  • 2021-06-14
  • 2021-12-10
  • 2022-12-23
相关资源
相似解决方案