當(dāng)前端傳來json數(shù)據(jù)時,后端有兩種方式可以接收:使用POJO和Map進(jìn)行接收。 前端json數(shù)據(jù): 1 2 3 4 5 6 7 8 9 { id:121, //數(shù)字 name:"lhj", //字符串 scoreList:[ //對象 {Java:95}, {Python:98}, {C++:94} ] } 使用POJO 若前端傳遞過來的數(shù)據(jù)剛好和我們的bean實體對象屬性一致,則可以使用對象...
www.dbjr.com.cn/article/2800...htm 2025-5-26