您的位置:首页 > 产品设计 > UI/UE

Hint: This may be the result of an unspecified view, due to default view name generation.)]

2017-05-08 18:29 681 查看
严重: Servlet.service() for servlet [springmvc] in context with path [/blog] threw exception [Circular view path [showArticleType]: would dispatch back to the current handler URL [/blog/showArticleType] again. Check your ViewResolver
setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)] with root cause

javax.servlet.ServletException: Circular view path [showArticleType]: would dispatch back to the current handler URL [/blog/showArticleType] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified
view, due to default view name generation.)

在开发时尽量不要自己注册如:

Java代码  


<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>  

<bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">  

尽量使用

Java代码  


<mvc:annotation-driven/>   

它设计的已经足够好,使用子元素可以配置我们需要的配置。

  

且不要使用老版本的:

Java代码  


<bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>  

<bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">  

否则可能得到如下异常:

写道

Circular view path [login]: would dispatch back to the current handler URL [/spring4/login] again. Check your ViewResolver setup! (Hint: This may be the result of an unspecified view, due to default view name generation.)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐