错误代码:
org.thymeleaf.exceptions.TemplateProcessingException: Link base "/img/logo.png" cannot be context relative (/...) unless the context used for executing the engine implements the org.thymeleaf.context.IWebContext interface (template: "common/head" - line 13, col 18)
解决方法:
<img th:src="@{/img/png.png}"
不使用 th: src="@{ }" 这种写法,换成下面这种:
<img src="/img/png.png"