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