前端js方法:
function reloadData() {
var id=$("input[name='id']").val();
$.ajax({
url: ctx + 'warehousing/certificateInfoRecord/reloadData/'+id,
type: 'GET',
success: function (data) {
console.log(datta)
}
});
}
后端使用@PathVariable接收参数值
@ResponseBody
@GetMapping("/reloadData/{id}")
public CertificateInfoRecord reloadData(@PathVariable("id") Long id) {
CertificateInfoRecord certificateInfoRecord = certificateInfoRecordService.selectCertificateInfoRecordById(id);
return certificateInfoRecord;
}