Idea under Spring Boot+fremarker start error would dispatch back to the current handler URL [/hello] again. Check your Viewresolver setup!

Source: Internet
Author: User

Detailed error code (PS: the title of the main code to write the error)
Javax.servlet.ServletException:Circular view path [Hello]: would dispatch back to the current handler URL [/hello] again. Check your Viewresolver setup!    (Hint:this May is the result of a 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. The origin of the problem
    IDEA中测试使用spring boot+freemarker时启动报错
2. Causes
    @RequestMapping("hello")中的路径与映射方法返回的视图名冲突了,不能写一样的

    (原来哪个代码图片找不到了,所以就直接写了一个,这只是例子,所以图中的错误可以忽略)
3. Workaround
    改一下视图名或者@RequestMapping 中的值就可以了....
4. Summary is not really a very advanced error, but it is easy for beginners to make mistakes, to avoid ... Reference

I've been to the top of the mountain and I've fallen down, both of which have benefited me a lot----Jewel Rider

Idea under Spring Boot+fremarker start error would dispatch back to the current handler URL [/hello] again. Check your Viewresolver setup!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.