1. 程式人生 > >springboot整合前端頁面thymeleaf

springboot整合前端頁面thymeleaf

step1:

拷貝程式碼:https://github.com/caiwangmeng/springboot-thymeleaf

step2:

解壓,idea open 資料夾位置,會自動初始化一些配置檔案,多出.idea資料夾等.

 

step3:

自動下載依賴,編譯之後,配置外部Tomcat,連結:  https://blog.csdn.net/duoduo1636546/article/details/81332986

此處專案名請配置app,否則啟動後js載入不了,以後自行修改。

step4:

啟動Tomcat後,彈出如下介面表示頁面跳轉成功:

 

 

新專案構建及解釋:

 

1.建立springboot工程,將其改為war包形式,連結:https://blog.csdn.net/javahighness/article/details/52515226

2.配置檔案:

3.新建頁面,新建controller

 

 

4.可能出錯的地方