🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
## 添加依赖 ~~~ <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-core</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.9.0</version> </dependency> <dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-annotations</artifactId> <version>2.9.0</version> </dependency> ~~~ ## 代码 ~~~ @RequestMapping(path = "/ok") public @ResponseBody User testResponse(@RequestBody User user) //响应json和获取json并封装到对象中 { //客户端发送的是ajax请求,是json字符串 return user; } ~~~