SpringBoot+Gradle+Freemarker报错,Check your ViewResolver setup


配置文件都对,报视图渲染错误:

Whitelabel Error Page

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

Fri May 05 18:52:50 CST 2017
There 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'

问题解决。


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM