AJAX 前端:
function exportCalendar(){
$.ajax({
cache:false,
url : ctx + "fhreservation/reservationCalendar/exportCalendar",
type : "POST",
dataType: "json",
data : {
placeId : placeId,
roomFloorId : roomFloorId
},
success : function(data) {
console.log(data);
}
});
}
SpringBoot后台:
@Controller
@RequestMapping("fhreservation/reservationCalendar")
public class RoomReservationCalendarController {
@PostMapping("/exportCalendar")
@ResponseBody
public Stirng ExportCalendar(@RequestParam Map<String,Object jsonData,HttpServletResponse response){
String placeId = jsonData.get("placeId").toString();
String roomFloorId = jsonData.get("roomFloorId").toString();
}