配置文件都对,报视图渲染错误:
Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Fri May 05 18:52:50 CST 2017There was an unexpected error (type=Internal Server Error, status=500).Circular view path [login]: would dispatch back to the current handler URL [/login] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
检查后发现Jar包要用SpringBoot自带的Freemarker,不能用Freemarker官方的,在Gradle配置文件里将Jar包替换为
compile 'org.springframework.boot:spring-boot-starter-freemarker'
问题解决。