Springboot導入freemarker模板


1.向pom.xml文件中加入依賴

2.application.poperties中添加后綴

3.在controller中添加model

 

 4.在html文件中顯示freemaker,模板默認是放在temlates文件夾下

Tips:如果html頁面無法識別freemaker的標簽,比如<#list>..

在idea settings中找到freemarker添加.*html,這樣標簽就不會報錯了

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM