maven中加入thymeleaf依赖
写一个controller
注解为@Controller(返回页面),@RestController为返回json
将页面放在resources目录下的templates文件夹
校验
访问:http://localhost:8080/testupload 页面正常显示
wx6289ced28e34b 博主文章分类:Java EE ©著作权
文章标签 spring html 上传文件 文章分类 spring boot 后端开发
注解为@Controller(返回页面),@RestController为返回json
访问:http://localhost:8080/testupload 页面正常显示
上一篇:Qt Designer生成的图形可以自适应窗口的大小变化
下一篇:小程序入门教程
SpringBoot+Thymeleaf的使用其实很简单,加依赖,加配置,写html5,然后就可以了,但是其中有遇到一些坑,所以记下来,以备后期查询。一、在pom.xml里添加依赖 <dependency> <groupId>org.springframework.boot</groupId> <a
举报文章
请选择举报类型
补充说明
0/200
上传截图
格式支持JPEG/PNG/JPG,图片不超过1.9M