技术
davyhi
这个作者很懒,什么都没留下…
展开
-
如何在springboot中跳转到静态页面
如果真的想跳转到static中的davy.html, 那你就写 return “redirect:davy.html”; 但不建议这么做 return的字符串是view的名称,会根据你配置的模版位置来查找,spring-boot默认时间模版存放在/resource/template下面, 不会到static目录下去寻找, redirect其实就是重定向到外部资源...原创 2018-09-04 17:12:27 · 4458 阅读 · 0 评论 -
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 · 3686 阅读 · 0 评论