|
@@ -1,5 +1,6 @@
|
|
package com.persagy.controller;
|
|
package com.persagy.controller;
|
|
|
|
|
|
|
|
+import com.fasterxml.jackson.databind.ObjectMapper;
|
|
import com.persagy.domain.*;
|
|
import com.persagy.domain.*;
|
|
import com.persagy.service.ReservationService;
|
|
import com.persagy.service.ReservationService;
|
|
import com.persagy.service.RoomService;
|
|
import com.persagy.service.RoomService;
|
|
@@ -8,6 +9,7 @@ import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.ui.Model;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
|
|
+import org.springframework.web.bind.annotation.ResponseBody;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
import javax.annotation.Resource;
|
|
import java.util.List;
|
|
import java.util.List;
|
|
@@ -25,8 +27,15 @@ public class OrdinaryController {
|
|
@Resource(name = "reservationServiceImpl")
|
|
@Resource(name = "reservationServiceImpl")
|
|
private ReservationService reservationService;
|
|
private ReservationService reservationService;
|
|
|
|
|
|
- @Resource(name = "userServiceImpl")
|
|
|
|
- private UserService userService;
|
|
|
|
|
|
+ @RequestMapping(value="/getString", method=RequestMethod.GET)
|
|
|
|
+ @ResponseBody
|
|
|
|
+ public String getString() throws Exception {
|
|
|
|
+ List<Room> list = null;
|
|
|
|
+ list = roomService.findByPaging(1);
|
|
|
|
+ ObjectMapper mapper = new ObjectMapper();
|
|
|
|
+ String jsonString = mapper.writeValueAsString(list);
|
|
|
|
+ return jsonString;
|
|
|
|
+ }
|
|
|
|
|
|
/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
|
|
/*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
|
|
// 会议室信息显示
|
|
// 会议室信息显示
|