Error resolving template [/common/head], template might not exist or might not be accessible by any

在window系統下沒問題。部署到linux下面出現這個問題

需要注意配置

spring.thymeleaf.prefix=classpath:/templates/

這裏已經有斜線了 引入模板的時候不需要再加了

<head th:replace="common/head::head">

</head>

 

common爲目錄templates下面的

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章