1. 首页
  2. 编程语言
  3. Java
  4. 详解如何配置springboot跳转html页面

详解如何配置springboot跳转html页面

上传者: 2022-02-03 00:06:59上传 PDF文件 131.81 KB 热度 17次

本文主要介绍了如何配置springboot跳转html页面,分享给大家,具体如下:是让controller层到templates文件夹寻找xx.html(src/main/resources/templates)3.在templates下建立index.html文件4.controller层注意:@controller不是@RestController,使用@RestController会返回“index”字符串5.在浏览器中地址栏输入:http://localhost:8080/test

下载地址
用户评论