由于Json数据传递与接收在以后的开发中是主流,所以把它拿出来独立记一篇笔记,其他的笔记太庞杂了。
1. json数据参数传递实现步骤
1.1 添加json数据转换相关坐标
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.0</version>
</dependency>
1.2 postman发送json数据,请求body中添加json数据)
1.3 开启自动转换json数据的支持
package com.zhang.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation