springboot項目創建鏈接 https://blog.csdn.net/q18771811872/article/details/88126835
springboot2.0 跳轉jsp教程 https://blog.csdn.net/q18771811872/article/details/88342298
jsp+html跳轉整合 https://blog.csdn.net/q18771811872/article/details/88343672
springboot 成功創建了后,繼續寫一下跳轉到html頁面的方法, 這里我把 jsp和html 分開兩篇文章。然后再寫一個兩種方式整合的
這篇 是跳轉到html文件的
1創建目錄結果和html文件
2配置return 返回模版
3.UserController.java代碼如下,這里就直接使用上次創建的查詢方法
4.application.yml 文件 配置 thymeleaf 模版參數
5. pom.xml 文件加入thymeleaf 架包
6. html頁面這里我為了方便事先引入了jQuery ,並且直接使用了thymeleaf 模版來接收數據,也是第一次用。
7. Project Structure里面 這個一般是默認配置好了的,如果沒有就要加上哦
就這樣啟動就行了 效果圖如下
springboot項目創建鏈接 https://blog.csdn.net/q18771811872/article/details/88126835
springboot2.0 跳轉jsp教程 https://blog.csdn.net/q18771811872/article/details/88342298
jsp+html跳轉整合 https://blog.csdn.net/q18771811872/article/details/88343672
原文地址: https://blog.csdn.net/q18771811872/article/details/88312862





