Add the following dependencies
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-mapper-asl</artifactId>
<version>1.9.7</version>
</dependency>
<dependency>
<groupId>org.codehaus.jackson</groupId>
<artifactId>jackson-core-asl</artifactId>
<version>1.9.7</version>
</dependency>
add request as follows
$.ajax({
url:urlName,
type:"POST",
contentType: "application/json; charset=utf-8",
data: jsonString, //Stringified Json Object
async: false, //Cross-domain requests and dataType: "jsonp" requests do not support synchronous operation
cache: false, //This will force requested pages not to be cached by the browser
processData:false, //To avoid making query String instead of JSON
success: function(resposeJsonObject){
}});
CONTROLLER SIDE
@RequestMapping(value = urlPattern , method = RequestMethod.POST)
public @ResponseBody Person save(@RequestBody Person jsonString) {
Person person=personService.savedata(jsonString);
return person;
}
@RequestBody -Covert Json object to java
@ResponseBody-convert Java object to json
相关推荐
Clustering data by identifying a subset of representative examples is important for processing sensory signals and detecting patterns in data. Such “exemplars” can be found by randomly choosing an ...
10.1.1. Getting to know Spring’s data-access exception hierarchy 10.1.2. Templating data access 10.2. Configuring a data source 10.2.1. Using JNDI data sources 10.2.2. Using a pooled data source ...
Chapter 1, Getting Started with JSON, introduces the audience to JSON, discusses the history of JSON along with how it works and stores itself in memory. The chapter also outlines the popular ...
Passing the exam demonstrates your understanding of Spring and validates your familiarity with: container-basics, aspect oriented programming (AOP), data access and transactions, Spring Security, ...
When designing a distributed application, you need to decide how to access and represent the business data associated with your application. This document provides guidance to help you choose the most...
Passing Binary Data in COM在COM中传递二进制数据
Model-View-Controller (MVC) is a design pattern put together to help control change. MVC decouples interface from business logic and data. Struts is an MVC implementation that uses Servlets 2.2 and ...
Until recently, many people thought big data was a passing fad. "Data science" was an enigmatic term. Today, big data is taken seriously, and data science is considered downright sexy. With this ...
Passing this exam earns you credit toward a Microsoft Certified Solutions Associate (MCSA) certification that demonstrates your mastery of essential skills for building and implementing on-premises ...
Passing parameters with data reports. I have set two parameters and passed them during run time.Open with VB6.
t was with a heavy heart that I made the decision not to participate in writing Pro Spring 2.5. I am deeply thankful that Jan was around to pick up this book and run with it. Pro Spring has been a big...
深入讲解了python函数传参的原理,值得一看
一般会反应是少了一个参数“true”,但是回去看就是 json_decode($data,true); 那怎么还会是NULL呢?难道是编码,不会啊,接收后直接打印是一个完整json字符串的形式,在网上json解析网站,也是可以正常解析的。 那...
Brendan J. Frey* and Delbert DueckClustering data by identifying a subset of rep
Among the simples coding schemes is linear coding, which regards a block of data as vector over a certain base field and allows a node to apply a linear ansformation to a vector before passing it on....
- From the S7A power tool it wasn't possible to open the online help file. Now it can be opened and also the context-sensitive help works properly. - When the signal conditioning function "S&M" ...
This book explains the forces behind this convergence of shared-memory, message-passing, data parallel, and data-driven computing architectures. It then examines the design issues that are critical ...
html5的data-role的属性,The jQuery Mobile ... To avoid naming conflicts with other plugins or frameworks that also use data- attributes, set a custom namespace by modifying the ns global option。
要将现有项目更新为新版本的react-scripts ,请 ,找到当前使用的版本(如果不确定,请检查此文件夹中的package.json ),然后为较新的版本应用迁移说明版本。 在大多数情况下,package.json的