原文:spring boot demo: controller跳轉到html頁面

為了測試寫了一個demo project,為了查看是否成功寫了一個index.html用於顯示。下面是代碼,其中有幾個注意事項。 . index.html要放在resources templates文件夾下。 這個和spring boot starter thymeleaf的默認配置有關 . pom.xml中要添加spring boot starter web和spring boot starte ...

2019-02-20 14:56 0 2087 推薦指數:

查看詳情

springboot用controller跳轉html頁面

之前SSM框架,里面有webapps文件夾,用來存放前端頁面和各種前端資源,現在SpringBoot中沒有webapps文件夾,springboot結構如下: 第一、resourses下文件夾public是我自己創建的,通過local host:8080/index.html ...

Fri Nov 08 01:11:00 CST 2019 0 1746
springboot跳轉到其他controller

其實就是重定向或者轉發就行 轉發:return "forward:/xxx"; 重定向:return "redirect:/xxx"; ...

Thu May 23 22:56:00 CST 2019 0 2359
 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM