Spring Boot實戰清華版 Web應用開發

  靜態頁面開發   在src/main/resources/static下創建index.html  這是一個靜態頁面。   訪問greeting 訪問index.html     基於Thymeleaf的web應用   添加依賴: 返回的名稱就是視圖模板的名稱:   創建模板src/main/resources/templates: 使用${name}讀取注入model的參數 效果:    
相關文章
相關標籤/搜索