mock测试出现Circular view path [trade_records]: would dispatch back to the current handler URL
摘要:这是因为你的Controller中返回的视图名称与你当前的requestMapping名称一样,这并没有很好的解决方案,除非你改掉其中一个名字。 因为springframework test时你并没有指定一个ViewResolver,默认启用的是InternalResourceViewResolve
阅读全文
posted @
2017-06-20 16:33
minjay26
阅读(6868)
推荐(1)
spring mvc通过客户端传值,controller获取Sort对象
摘要:之前客户端需要根据需求按不同的排序方式查看数据,按照一种约定排序,比如1代表时间升序,2代表时间降序,3,4这种形式,然后后台根据这些值创建Sort对象。 后来发现完全多此一举,可以根据特定的方式,直接在controller层获得到Sort对象,例如客户端调用localhost:8080/user/
阅读全文
posted @
2017-05-29 17:33
minjay26
阅读(420)
推荐(0)