spring boot(用postman来测试rest api)

前言 我们开发完spring boot rest接口后,需要自测,当然可能通过junit test 来测试service或用restTemplate来测试rest controller方法,但还是和调方的请求方式有差距,这时可以用postman来模拟http请求,是比较方便的 1、 @RequestBody 接收请求参数 一般spring boot后台都用@RequestBody来直接接收一个对象
相关文章
相关标签/搜索