Spring boot+thymeleaf报错

这里就不截图了,又要保存又要添加进来,比较麻烦,我直接copy报错到这里吧

1、以下是浏览器报错的内容


Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.

Fri Aug 31 23:27:48 CST 2018
There was an unexpected error (type=Internal Server Error, status=500).
Error resolving template "id: 23", template might not exist or might not be accessible by any of the configured Template Resolvers


解决方法:

在这之前也找了很多解决方案,大家都可以试试,但是我这边没生效,有些修改配置的,有些说是url末尾没有加/

在类上加入注解, 我原来是用@Controller现在改成 @RestController运行就搞定了

你可能感兴趣的:(Spring boot+thymeleaf报错)