【SpringBoot】测试Control接口方法

测试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 = [   ]

 

相关推荐

  1. SpringBoot测试Control接口方法

    2024-07-21 09:06:03       17 阅读
  2. Springboot项目中Controller层的单元测试

    2024-07-21 09:06:03       130 阅读
  3. 接口测试方式

    2024-07-21 09:06:03       51 阅读
  4. SpringBoot】单元测试测试Service方法

    2024-07-21 09:06:03       19 阅读
  5. SpringBootController与Test

    2024-07-21 09:06:03       13 阅读
  6. springboot接口提高查询速度方法

    2024-07-21 09:06:03       34 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-07-21 09:06:03       52 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-07-21 09:06:03       54 阅读
  3. 在Django里面运行非项目文件

    2024-07-21 09:06:03       45 阅读
  4. Python语言-面向对象

    2024-07-21 09:06:03       55 阅读

热门阅读

  1. Vit配置

    2024-07-21 09:06:03       18 阅读
  2. Tracy 小笔记:微信小程序 mpx 雷达图的实现

    2024-07-21 09:06:03       15 阅读
  3. C++知识点总结(49):树的存储与遍历

    2024-07-21 09:06:03       18 阅读
  4. 内存管理(知识点)

    2024-07-21 09:06:03       18 阅读
  5. 1604 - 高精度除单精度

    2024-07-21 09:06:03       14 阅读
  6. 数据结构(功能受限的表-栈&队列)

    2024-07-21 09:06:03       18 阅读
  7. Linux 下部署 syncthing 中继服务器

    2024-07-21 09:06:03       21 阅读
  8. 云计算遭遇的主要安全威胁

    2024-07-21 09:06:03       14 阅读
  9. 服务发现的艺术:Eureka中实现分布式服务目录

    2024-07-21 09:06:03       18 阅读