码迷,mamicode.com
首页 > 编程语言 > 详细

IDEA下spring boot+fremarker启动报错would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup!

时间:2018-09-08 13:04:54      阅读:4776      评论:0      收藏:0      [点我收藏+]

标签:ati   except   specified   framework   http   技术分享   pytho   tput   是什么   

详细报错代码(ps:标题中写不下报错主要代码)

javax.servlet.ServletException: Circular view path [hello]: would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
    at org.springframework.web.servlet.view.InternalResourceView.prepareForRendering(InternalResourceView.java:209) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.view.InternalResourceView.renderMergedOutputModel(InternalResourceView.java:147) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.view.AbstractView.render(AbstractView.java:314) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.render(DispatcherServlet.java:1325) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.processDispatchResult(DispatcherServlet.java:1069) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1008) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]
    at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:866) ~[spring-webmvc-5.0.8.RELEASE.jar:5.0.8.RELEASE]

1.问题由来

    IDEA中测试使用spring boot+freemarker时启动报错

2.原因

    @RequestMapping("hello")中的路径与映射方法返回的视图名冲突了,不能写一样的

如图

技术分享图片

    (原来哪个代码图片找不到了,所以就直接写了一个,这只是例子,所以图中的错误可以忽略)

3.解决方法

    改一下视图名或者@RequestMapping 中的值就可以了....

4.总结

其实都不是什么很高深的错误,但是是新手很容易犯的错误,避免之...

引用

我曾踏足山巅,也曾跌落低谷,二者都使我受益良多----宝石骑士

IDEA下spring boot+fremarker启动报错would dispatch back to the current handler URL [/hello] again. Check your ViewResolver setup!

标签:ati   except   specified   framework   http   技术分享   pytho   tput   是什么   

原文地址:https://www.cnblogs.com/cailiang1026/p/9608805.html

(0)
(1)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!