原文:spring boot demo: controller跳转到html页面

为了测试写了一个demo project,为了查看是否成功写了一个index.html用于显示。下面是代码,其中有几个注意事项。 . index.html要放在resources templates文件夹下。 这个和spring boot starter thymeleaf的默认配置有关 . pom.xml中要添加spring boot starter web和spring boot starte ...

2019-02-20 14:56 0 2087 推荐指数:

查看详情

springboot用controller跳转html页面

之前SSM框架,里面有webapps文件夹,用来存放前端页面和各种前端资源,现在SpringBoot中没有webapps文件夹,springboot结构如下: 第一、resourses下文件夹public是我自己创建的,通过local host:8080/index.html ...

Fri Nov 08 01:11:00 CST 2019 0 1746
springboot跳转到其他controller

其实就是重定向或者转发就行 转发:return "forward:/xxx"; 重定向:return "redirect:/xxx"; ...

Thu May 23 22:56:00 CST 2019 0 2359
 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM