错误代码
There was an unexpected error (type=Internal Server Error, status=500).
Circular view path [account]: would dispatch back to the current handler URL [/account] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
springboot版本为2.2.2.RELEASE
使用yml代替properties 出现Circular view path [account]: would dispatch back to the current handler URL [/account] again. Check your ViewResolver setup!
解决方案
将application.yml里的thymeleaf配置的view-names注释掉
#可解析的视图名称列表,用逗号分隔
# view-names:
#检查模板位置是否正确 (默认值:true)
check-template-location: true
#开启MVC Thymeleaf视图解析(默认值:true)
enabled: true
#Thymeleaf模板解析器在解析器链中的顺序。默认情况下,它排第一位。顺序从1开始,只有在定义了额外的TemplateResolver Bean时才需要设置这个属性。
template-resolver-order:
再次访问/account 成功得到页面