该框架使用了特定的方式来进行配置,从而使开发人员不再需要定义样板化的配置。 spring.thymeleaf.mode = LEGACYHTML5 spring boot建议不要使用JSP,建议使用Thymeleaf来做动态页面传递参数到html页面,也就是html页面 在pom.xml 才可以返回html页面,使用@ResController 返回的是字符串 1 <! 14 </body> 15 </html> 注册界面 resgi.html: 1 <! > 13 </html> 这里说一下,如果错误界面命名为 error.html 的话,那么 springboot 报错时跳转的页面就是默认跳转到你定义的 error.html 页面。