th:href,th:src等标签使用小坑

<link rel="stylesheet" type="text/css" href="statics/css/index.css" th:href="@{/statics/css/index.css}" media="all" />

其中的@{}里边必须要以“/”开头,才能正确根据项目路径找到相应的静态资源。

猜你喜欢

转载自blog.csdn.net/ouyang_ouba/article/details/89416034
th