首页 > 代码库 > mock测试出现Circular view path [trade_records]: would dispatch back to the current handler URL

mock测试出现Circular view path [trade_records]: would dispatch back to the current handler URL

这是因为你的Controller中返回的视图名称与你当前的requestMapping名称一样,这并没有很好的解决方案,除非你改掉其中一个名字。

因为springframework test时你并没有指定一个ViewResolver,默认启用的是InternalResourceViewResolver。

Stack Overflow:https://stackoverflow.com/questions

mock测试出现Circular view path [trade_records]: would dispatch back to the current handler URL