would dispatch back to the current handler URL [/appversion] again. Check your ViewResolver setup!

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

报这个错误的主要原因:springMVC对于读取映射地址的混乱,主要是写的地址@RequestMapping("/xxx")和view里面的映射地址重复,解决这个bug的2个办法;

1是在方法体里面加入@ResponseBody(如果前后分离,建议使用这种)

2是在pom文件加入theme依赖


 

你可能感兴趣的:(java,java,框架)