简体   繁体   English

如何从Postman到Rest Controller获取JSON数据

[英]How to Get JSON Data From Postman to Rest Controller

I have some questions on rest, pls help. 我对休息有一些疑问,请帮助。

Q 1.) 问1。

I am working on Spring MVC and already configured dispatcher servlet to take incoming request, but now I am using some restfull web services also in that project, so is there any thing to change in web.xml file? 我正在使用Spring MVC,并且已经配置了分派器servlet来接收传入的请求,但是现在我在该项目中也使用了一些restfull Web服务,因此web.xml文件中是否需要更改?

Q. 2) How to hit rest controller from Postman tool by passing JSON data inside body, using put request?. Q. 2)如何通过使用put请求在主体内部传递JSON数据来从Postman工具中击中rest控制器?

Thanks, Shashank 谢谢,Shashank

Please do same as shown in bellow Images it definitely works don't forget to like Step 1 请按照以下波纹管图像中的步骤进行操作,它确实起作用,别忘了喜欢步骤1 在此处输入图片说明 Just select the PUT method in drop-down and Pass the Token do same as there in Image 只需在下拉菜单中选择PUT方法,然后将令牌传递给Image就可以了

Step 2 第2步

选择“正文”和“原始”单选按钮,然后在下拉菜单中选择“ JsonApplication”,如镜像所示

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM