测试Controller接口方法:
执行单元测试:
MockHttpServletRequest:
HTTP Method = POST
Request URI = /hello
Parameters = { }
Headers = [ Content-Type:"application/json;charset=UTF-8"]
Body = null
Session Attrs = { }
Handler:
Type = com.weiz.helloworld.web.HelloContrller
Method = com.weiz.helloworld.web.HelloController#hello()
Async:
Async started =false
Async result = null
Resolved Exception:
Type = null
ModelAndView:
View name = null
View = null
Model = null
FlashMap:
Attributes = null
MockHttpServletResponse:
Status = 200
Error message = null
Headers = [ Content-Type:"text/plain;charset=UTF-8",Content-Length:"17"]
Content type = text/plain;charset=UTF-8
Body = hello Spring Boot
Forward URL = null
Redirected URL = null
Cookies = [ ]