寫了一個AuthController的接口,執行至方法結束,本覺得成功了,可是Spring卻給了一個模板沒法渲染的異常提示。html
template might not exist or might not be accessible by any of the configured Template Resolvers
可是我工程裏面沒有配置過template,因此應該不是tempalte的問題;markdown
後來在controller把@Controller換成@RestController解決;ide
查了一個二者的區別:
配置@RestController的做用至關同時配置了@Controller和@ResponseBody兩個註解idea
後來我將@RestController換成@Controller和@ResponseBody也是沒有問題的。spa