- 博客(2)
- 收藏
- 关注
原创 springboot 直接返回静态资源html
通常spring boot的一般教程的例子都是通过模板来返回页面,比如thymeleaf或者freemarker,但是直接返回html的例子比较少。本文参考文章 SpringBoot : How to display static html file in Spring boot MVC application 。说明如何让spring boot直接返回html。 一般来说 resources/...
2018-09-04 17:15:02
3715
原创 如何在springboot中跳转到静态页面
如果真的想跳转到static中的davy.html, 那你就写 return “redirect:davy.html”; 但不建议这么做 return的字符串是view的名称,会根据你配置的模版位置来查找,spring-boot默认时间模版存放在/resource/template下面, 不会到static目录下去寻找, redirect其实就是重定向到外部资源...
2018-09-04 17:12:27
4487
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人