return "redirect:/index.html";
return "redirect:index.html";
return "redirect:index";
这3种全部不行,重定向就报404
但是:return "index";就可以
这是为什么呢??
redirect是跳转.action的 html就不需要加这个
你从定性是跳转到action的吧?你跳转到html页面???
是否设置html页面可直接访问,你应该是隐藏了对外的.html访问,所以要跳转不同的请求吧
application.yml
spring:
thymeleaf:
mode: LEGACYHTML5
加上上面这个试试,,,
题主看看控制台有没有报错,,
把return "redirect:index"改成return "redirect:/index"试试