错误信息:
Error resolving template "aaaa", template might not exist or might not be accessible by any of the configured Template Resolvers
我的配置:

controller:

项目目录:

但是浏览器输入:http://192.168.1.35:8080/team/toAdd 访问的时候出现了上面的错误:

最后网上百度找到了答案!在此记录一下:
因为默认的路径是spring.thymeleaf.prefix=classpath:/templates/ 你再写/就多出一个斜杠了
所以,我的问题是,application.yml 中配置的 spring.thymeleaf.prefix=classpath:/templates
我这里最后没有加 / ,所以导致找不到页面。修改后的配置如下:

controller:

1762



被折叠的 条评论
为什么被折叠?



