ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - [log,175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception thymeleaf: Could not parse as expression: ""

请求报500,一直以为是后台问题

【原因】

前端thymeleaf模板代码没写完整原因(既然用了就要写好格式)

ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - [log,175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception thymeleaf: Could not parse as expression: ""

【解决】

将用到thymeleaf标签代码补全,主要原因没用这个@{}补全th:href标签

<a th:href="@{/uploadmoment/mvmain}" title="">首页a>

ERROR o.a.c.c.C.[.[.[.[dispatcherServlet] - [log,175] - Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception thymeleaf: Could not parse as expression: ""

 

相关文章: