首页 > 其他分享 >接收json数据

接收json数据

时间:2023-02-26 15:34:04浏览次数:33  
标签:com springframework json org import 接收 数据 annotation

1.导入坐标:

<dependency>
  <groupId>com.fasterxml.jackson.core</groupId>
  <artifactId>jackson-databind</artifactId>
  <version>2.9.0</version>
</dependency>

2.开启自动转换json的数据支持

package com.itheima.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;

@Configuration
@ComponentScan("com.itheima.controller")
@EnableWebMvc
public class springMvcConfig {
}

 

标签:com,springframework,json,org,import,接收,数据,annotation
From: https://www.cnblogs.com/lin513/p/17156786.html

相关文章