默认contenType下

在ajax中不写contentType的情况下

contentType:"application/x-www-form-urlencoded;charset=UTF-8" (默认)

总结以下例证:

当ajax为默认的application/x-www-form-urlencoded时,能够处理简单的JSON(单层),遇到复杂的嵌套JSON的情况就不能处理了(含数组情况);

这种情况下要处理嵌套JSON的内容,必须将其转化成传统的key=value的形式后放入ajax的data中。

相对而言,在简单的JSON情况下,后台的controller中直接在方法上写形参即可,亦可用vo对象接收;而在复杂参数的情况下,必须使用vo对象来进行值接收,再写在形参上是行不通的。

1.当为简单JSON时

以下传输的json中4个字段都为字符串

ajax

// 例如:
// -----------------right-begin-----------------
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd';
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data: {
"history": history,
"professionScale": professionScale,
"constructionScale": constructionScale,
"award": award},
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// -----------------right-end-----------------

controller

// -----------------right-begin-----------------
// 以下1.2均可 // 1.用单独的字段来接收
@PostMapping("/api/admin/about-JK/edit-JK-text")
// 顺便补充,如果前台json传过来的名称中有和参数名称不对应的情况
// 例如:profession_scale,只需要在参数前加
// @RequestParam("profession_scale") String professionScale
// 但是只能是用单个参数接收的时候可以用,但是如果是vo对象接收,就没有办法了!
// 还是只能修改ajax中data的key
public JsonData editAboutJKTextAdmin(
String history, String professionScale,String constructionScale,
String award) {
JsonData json = aboutJKService.editAboutJKText(aboutJKVo); return json;
} // 2.用vo对象来接受
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(AboutJKVo aboutJKVo) {
JsonData json = aboutJKService.editAboutJKText(aboutJKVo); return json;
} // -----------------right-end-----------------

vo

// -----------------right-begin-----------------
@Data //lombok
@AllArgsConstructor //lombok
@NoArgsConstructor //lombok
public class AboutJKVo implements Serializable {
private String history;
private String professionScale;
private String constructionScale;
private String award;
}
// -----------------right-end-----------------

2.当为复杂JSON的时候

意为多重嵌套的JSON,最典型的即含有数组的JSON

ajax

// 1.
// ------------------- error-begin -------------------
// 服务器直接 500
var carouselLink = new Array();
carouselLink.push('1.jpg');
carouselLink.push('2.jpg');
carouselLink.push('3.jpg');
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd';
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data: {
"carouselLink": carouselLink,
"history": history,
"professionScale": professionScale,
"constructionScale": constructionScale,
"award": award},
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// ------------------- error-end -------------------
// 如果还要使用默认contentType为application/x-www-form-urlencoded;charset=UTF-8
// 以上的ajax已经行不通了!
// 那应该怎么写?
// 使用application/x-www-form-urlencoded兼容度最高的key=value形式
// 2.
// ------------------- right-begin -------------------
var carouselLink = new Array();
carouselLink.push('1.jpg');
carouselLink.push('2.jpg');
carouselLink.push('3.jpg');
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd';
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:
"carouselLink="+carouselLink+"&history=" + history+
"&professionScale="+ professionScale +
"&constructionScale="+ constructionScale +"&award=" + award,
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// ------------------- right-end -------------------

controller

// 3.
// ------------------- error-begin -------------------
// 1.用单独的字段来接收
// 服务器也是直接 500
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(
List<String> carouselLink,
String history, String professionScale,String constructionScale,
String award) {
System.out.println(carouselLink + history +
professionScale + constructionScale + award); return null;
}
// ------------------- error-end -------------------
// 当key=value中有了list之后,controller内便不能直接用参数接收了!
// 只能通过vo对象来接收
// 4.
// -----------------right-begin-----------------
// 2.用vo对象来接受
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}
// -----------------right-end-----------------

vo

// -----------------right-begin-----------------
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AboutJKVo implements Serializable {
private List<String> carouselLink;
private String history;
private String professionScale;
private String constructionScale;
private String award;
}
// -----------------right-end-----------------

结果

1 和 3 组合 500 NoSuchMethodException

1 和 4 组合 500 java.lang.NumberFormatException: For input string: ""

2 和 3 组合 500 NoSuchMethodException

2 和 4 组合 success!

contentType为application/json时

在ajax中声明 contentType的类型:

contentType: "application/json"

总结以下例证

1.当ajax声明contentType: "application/json"之后,与之对应,不能再像默认contentType为application/x-www-form-urlencoded的时候一样,直接传递json对象了,必须传递json字符串!

通过JSON.stringify() 去将json对象转化成json字符串。

2.与之对应,controller需要注意的是:

  • controller中,跟在@RequestBody后的参数,和ajax传递过来的json字符串,必须是严格的json层级对应情况!

    • 情况一:假如ajax传输的json字符串为'[1, 2, 3]' 与之对应,controller的形参中,就必须有一个List<Integer> list 去接收它。

    • 情况二:假如ajax传输的json字符串为'{"names":["aaa", "bbb", "ccc"]}',那么controller的形参中,就必须是一个vo对象,并且对象中有一个叫做names的List<String>。

    • 总:只要外部有{},则controller应该用vo对象接收,直接是'aaa'字符串,或者['aaa', 'bbb']数组,则必须用一个对应的String 类型,或者List<string>类型来接收。

  • @RequestBody在一个controller层方法中,只能出现一次。

    • 如果一个方法形参中出现多个@RequestBody,将会注入失败。
    • 如果只有一个String类型的参数,但是ajax传输过来的是一个复杂json,那么这个复杂json将以字符串的形式被全部注入到那个String类型的参数中,这是一种极端情况。

3.补充,建议:可能是jquery的版本问题,在我原来使用3.x版本的jquery时,出现过复杂json无法注入vo对象的情况,原因是jquery默认会调用jQuery.param深度序列化参数,以适应如PHP和Ruby on Rails框架,但servelt api无法处理。但这里我使用的jquery-2.1.1并未出现此状况。

但稳妥起见,建议在ajax中加上参数traditional:true,来保障json的解析正常!

1.restful风格下传递复杂json

ajax

// 1.
// ------------------- error-begin -------------------
var carouselLink = new Array();
carouselLink.push('1.jpg');
carouselLink.push('2.jpg');
carouselLink.push('3.jpg');
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd';
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:{
"carouselLink": carouselLink,
"history": history,
"professionScale": professionScale,
"constructionScale": constructionScale,
"award": award},
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// ------------------- right-end ------------------- // 2.
// -----------------right-begin-----------------
var carouselLink = new Array();
carouselLink.push('1.jpg');
carouselLink.push('2.jpg');
carouselLink.push('3.jpg');
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd'; var dataJSON = {
"carouselLink": carouselLink,
"history": history,
"professionScale": professionScale,
"constructionScale": constructionScale,
"award": award} var dataJSONStr = JSON.stringify(dataJSON);
console.log(dataJSON)
console.log(dataJSONStr)
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
data: dataJSONStr,
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// -----------------right-end-----------------

controller

// 3.
// ------------------- error-begin -------------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(List<String> carouselLink, String history,
String professionScale, String constructionScale,
String award) {
System.out.println(carouselLink +
history +
professionScale +
constructionScale + award);
return null;
}
// ------------------- error-end ------------------- // 4.
// ------------------- error-begin -------------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody List<String> carouselLink,
@RequestBody String history,
@RequestBody String professionScale,
@RequestBody String constructionScale,
@RequestBody String award) {
System.out.println(carouselLink +
history +
professionScale +
constructionScale + award);
return null;
}
// ------------------- error-end ------------------- // 5.
// ------------------- error-begin -------------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}
// ------------------- error-end ------------------- // 6.
// -----------------right-begin-----------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}
// -----------------right-end-----------------

vo

// -----------------right-begin-----------------
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AboutJKVo implements Serializable {
private List<String> carouselLink;
private String history;
private String professionScale;
private String constructionScale;
private String award;
}
// -----------------right-end-----------------

结果

1 和 3 组合 500 NoSuchMethodException

1 和 4 组合 400 JSON parse error: Unrecognized token 'carouselLink'

1 和 5 组合 无报错,但

AboutJKVo(carouselLink=null, history=null, professionScale=null, constructionScale=null, award=null)

1 和 6 组合 400 badRequest!

2 和 3 组合 500 NoSuchMethodException

2 和 4 组合 400 JSON parse error

2 和 5 组合 无报错,但

AboutJKVo(carouselLink=null, history=null, professionScale=null, constructionScale=null, award=null)

2 和 6 组合 success!

2.restful风格下传递简单json

ajax

// 1.
// ------------------- error-begin -------------------
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd';
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:{
"history": history,
"professionScale": professionScale,
"constructionScale": constructionScale,
"award": award},
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// ------------------- error-end ------------------- // 2.
// -----------------right-begin-----------------
var history = 'aaa';
var professionScale = 'bbb';
var constructionScale = 'ccc';
var award = 'ddd'; var dataJSON = {
"history": history,
"professionScale": professionScale,
"constructionScale": constructionScale,
"award": award} var dataJSONStr = JSON.stringify(dataJSON);
console.log(dataJSON)
console.log(dataJSONStr)
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
data: dataJSONStr,
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});
// -----------------right-end-----------------

controller

// 3.
// ------------------- error-begin -------------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(String history, String professionScale,
String constructionScale,
String award) {
System.out.println(history +
professionScale +
constructionScale + award);
return null;
}
// ------------------- error-end ------------------- // 4.
// ------------------- error-begin -------------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody String history,
@RequestBody String professionScale,
@RequestBody String constructionScale,
@RequestBody String award) {
System.out.println(history +
professionScale +
constructionScale + award);
return null;
}
// ------------------- error-end ------------------- // 5.
// ------------------- error-begin -------------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}
// ------------------- error-end ------------------- // 6.
// -----------------right-begin-----------------
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}
// -----------------right-end-----------------

vo

// -----------------right-begin-----------------
@Data
@AllArgsConstructor
@NoArgsConstructor
public class AboutJKVo implements Serializable {
private String history;
private String professionScale;
private String constructionScale;
private String award;
}
// -----------------right-end-----------------

结果

1 和 3 组合 无报错,但 4个参数全为null

1 和 4 组合 400 badRequest @RequestBody需要的参数无法注入

1 和 5 组合 无报错,但 4个参数全为null

1 和 6 组合 JSON parse error

2 和 3 组合 无报错,但4个参数全为null

2 和 4 组合 400 badRequest @RequestBody需要的参数无法注入

2 和 5 组合 无报错,但 4个参数全为null

2 和 6 组合 success!

3.restful风格下传递list

ajax

// 1.
var list = new Array();
list.push('1.jpg');
list.push('2.jpg');
list.push('3.jpg'); $.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:list,
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
}); // 2.
var list = new Array();
list.push('1.jpg');
list.push('2.jpg');
list.push('3.jpg'); $.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:{'list':list},
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
}); // 2.+
var list = new Array();
list.push('1.jpg');
list.push('2.jpg');
list.push('3.jpg');
var dataJSON = {'list':list}
var dataJSONStr = JSON.stringify(dataJSON);
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data: dataJSONStr,
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
}); // 3.
var carouselLink = new Array();
carouselLink.push('1.jpg');
carouselLink.push('2.jpg');
carouselLink.push('3.jpg'); var list = JSON.stringify(carouselLink);
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:list,
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});

controller

// 4.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(List<String> list) {
System.out.println(list); return null;
} // 5.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody List<String> list) {
System.out.println(list); return null;
} // 6.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
} // 7.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}

vo

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AboutJKVo implements Serializable {
private List<String> list;
}

结果

1 和 4 500 NoSuchMethodException

1 和 5 400 JSON parse error

1 和 6 无报错,但为null

1 和 7 400 JSON parse error

2 和 4 500 NoSuchMethodException

2 和 5 400 JSON parse error

2 和 6 无报错,但为null

2 和 7 400 JSON parse error

3 和 4 500 NoSuchMethodException

3 和 5 success!

3 和 6 无报错,但为null

3 和 7 400 JSON parse error

2+ 和 4 500 NoSuchMethodException

2+ 和 5 400 JSON parse error

2+ 和 6 无报错,但为null

2+ 和 7 success!

4.restful下传递单参

ajax

// 1.
var professionScale = 'aaa' $.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data: professionScale,
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
}); // 2.
var professionScale = 'aaa' $.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data:{'professionScale':professionScale},
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
}); // 3.
var professionScale = 'aaa' var dataJSON = {'professionScale':professionScale}
var dataJSONStr = JSON.stringify(dataJSON);
$.ajax({
url:"/api/admin/about-JK/edit-JK-text",
contentType:'application/json',
type: "POST",
// 期待服务器返回的类型:json、jsonp、text ... 此参数加上最好
dataType: "json",
data: dataJSONStr,
dataType: "json",
success: function (res) {
if (res.code == 0) {
console.log(res);
} else {
console.log(res);
}
},
error: function () {
console.log('请求系统异常');
}
});

controller

// 4.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(String professionScale) {
System.out.println(professionScale); return null;
} // 5.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody String professionScale) {
System.out.println(professionScale); return null;
} // 6.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
} // 7.
@PostMapping("/api/admin/about-JK/edit-JK-text")
public JsonData editAboutJKTextAdmin(@RequestBody AboutJKVo aboutJKVo) {
System.out.println(aboutJKVo); return null;
}

vo

@Data
@AllArgsConstructor
@NoArgsConstructor
public class AboutJKVo implements Serializable {
private String professionScale;
}

结果

1 和 4 无报错,但为null

1 和 5 success!

1 和 6 无报错,但为null

1 和 7 JSON parse error: Unrecognized token 'aaa'

2 和 4 无报错,但为null

2 和 5 错误的值 professionScale = "professionScale=aaa"

2 和 6 无报错,但为null

2 和 7 JSON parse error: Unrecognized token 'professionScale'

3 和 4 无报错,但为null

3 和 5 错误的值 professionScale = "{"professionScale":"aaa"}"

3 和 6 无报错,但为null

3 和 7 success!

ajax前后台通信验错的更多相关文章

  1. flask+sqlite3+echarts2+ajax数据可视化报错:UnicodeDecodeError: 'utf8' codec can't decode byte解决方法

    flask+sqlite3+echarts2+ajax数据可视化报错: UnicodeDecodeError: 'utf8' codec can't decode byte 解决方法: 将 py文件和 ...

  2. ajax 异步 通信 小例子 servlet与 jsp异步 get

    get  请求参数通过 url那里写进去,然后send(null) html文件和 servlet进行通信 通过ajax 进行通信 <!DOCTYPE html PUBLIC "-// ...

  3. ajax jsonp请求报错not a function的解决方案

    概述 最近工作中使用ajax,有时会报json4 is not a function的错误,有时又不会报错.找了很久,网上说是因为多次请求同一个资源导致的,但是我检查了自己的代码,对于重复资源并没有重 ...

  4. 火狐浏览器调试ajax异步页面时报错NS_ERROR_UNEXPECTER

    第一个直观的结论就是ajax调用出错,如果其他浏览器却调用没报错,而且正常返回值了,那么就是Firefox浏览器的问题了: 如果其他浏览器也没余完全正常执行,而是出现和我上一篇ajax向后台请求数据, ...

  5. javascript使用web proxy来实现ajax cross-domain通信

    在现代浏览器中,都强加了对javacript代码的访问限制,比如一个页面的js无法向非同源的url实现ajax请求,获得数据.在这时,是浏览器端会报错: No 'Access-Control-Allo ...

  6. ajax 异步 通信 小例子 servlet与 jsp异步 post方法

    post请求 url后面加参数 接收不到的,必须 放到send("use"=user)形式 还要加上 xhr.setRequestHeader("Content-Type ...

  7. LigerUI用Post\Get\Ajax前后台交互方式的写法

    parms 参数统一 json格式的数据 url 访问后台的url 设置同步参数 [javascript] view plain copy   $.ajaxSetup({ async : false} ...

  8. ajax post 请求报错Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' heade

    jquery ajax跨域请求,webapi webconfig配置 前台代码(放了一部分) function CheckIn(roomno) { $.ajax({ url: 'https://www ...

  9. Websocket实现前后台通信,demo小测试

    新需求大概如下:用户登录系统,登录成功之后建立websocket连接,实现通信 总体思路:前端不是我负责,只是简单的做个功能,先实现登录,把用户标识存入HttpSeesion,再建立websocket ...

随机推荐

  1. [004] .NET 的现状和未来

    我们总是能听到一些人说,.NET 不行.学 .NET 没发展前途之类的言论,有的童鞋听多了便也开始怀疑自己选择的 .NET 方向是不是错了. 不得不承认,在 .NET 没有实现跨平台之前,市场行情确实 ...

  2. Kubernetes部署-RKE自动化部署

    一.简介 RKE:Rancher Kubernetes Engine 一个极其简单,闪电般快速的Kubernetes安装程序,可在任何地方使用. 二.准备工作 I.配置系统 系统:CentOS 7 / ...

  3. Linux 安装 Nodejs 的两种方式

    Linux 安装 Nodejs 的两种方式 目录 Linux 安装 Nodejs 的两种方式 一.压缩包安装 Nodejs 二.源码编译安装 Nodejs 一.压缩包安装 Nodejs 下载 Node ...

  4. informix常见问题

    1.中文乱码 https://www.cnblogs.com/equation/p/5545967.html 2.informix创建数据库和用户 https://wenku.baidu.com/vi ...

  5. 多个filter如何决定调用顺序

    答案是:web-inf中的web.xml决定

  6. MySQL 到底是如何做到多版本并发的?

    之前的文章简单的介绍了 MySQL 的事务隔离级别,它们分别是:读未提交.读已提交.可重复读.串行化.这篇文章我们就来探索一下 MySQL 事务隔离级别的底层原理. 本篇文章针对 InnoDB 存储引 ...

  7. C#曲线分析平台的制作(一,ajax+json前后台数据传递)

    在最近的项目学习中,需要建立一个实时数据的曲线分析平台,这其中的关键在于前后台数据传递过程的学习,经过一天的前辈资料整理,大概有了一定的思路,现总结如下: 1.利用jquery下ajax函数实现: & ...

  8. 看视频学SignalR—在微软虚拟学院学习SignalR

    SignalR把实时Web功能变得异常简单. 如果您希望在几个小时内对SignalR有一个直观的了解,观看微软虚拟学院(MVA)的视频教学Lighting Up Real-Time Web Commu ...

  9. 大数据学习(13)—— HBase入门

    从这一篇起,开始介绍HBase相关知识.还是一样,大数据的学习,获取官网知识很重要.官网看这里Apache HBase HBase简介 Apache HBase is the Hadoop datab ...

  10. Podman 快速入门

    今天在某云上新购一台云服务器,发现已经有了 CentOS8.2 官方镜像可选,出于对新鲜事物的好奇,我决定开始采用 CentOS8.2,即使我还没有为它的新特性做好准备. 我的应用主要以单机版容器为主 ...