初学thymeleaf踩过的坑(@RestController和@Controller的区别)

1.问题重现(请求http://localhost:9090/world)返回的字符串而不是html页面 2.百度一顿骚操作说是thymeleaf引入的jar把问题(然而pom.XML并没有问题……) 3.最后发现是Controller类里面写的注解问题,正确应该是@Controller 4.问题解惑 [email protected]注解相当于@ResponseBody + @Controlle
相关文章
相关标签/搜索