关与一天整一个bug(Error resolving template [create_employees], template might not exist or might not be ac)
初学spring boot和thymeleaf的一些启示:
首先谈解决问题:这个error描述得很清楚,就是无法解析controller里的映射条件如@GetMapping("/employees")。那么为什么爆出这个error呢?原因是这个映射的值与前端资源的文件名不一致,我的访问文件是employees.html,但是之前一直是employee.html
网上有很多教程说是配置thymeleaf,实际上,除非真的想改前端访问资源的位置或是格式、编码等,否则不需要特别配置thymeleaf,在新版的sp
原创
2022-02-27 00:18:59 ·
254 阅读 ·
0 评论