wushengzong 6 yıl önce
ebeveyn
işleme
2106cea674

+ 19 - 0
pom.xml

@@ -7,6 +7,25 @@
   <version>1.0-SNAPSHOT</version>
   <name>booking Maven Webapp</name>
   <url>http://maven.apache.org</url>
+  <repositories>
+    <repository>
+      <id>alimaven</id>
+      <name>aliyun maven</name>
+      <url>http://maven.aliyun.com/nexus/content/groups/public</url>
+    </repository>
+    <repository>
+      <id>mvnrepository</id>
+      <url>https://mvnrepository.com/</url>
+    </repository>
+    <!--
+    <repository>
+        <id>sonatype-nexus-snapshots</id>
+        <name>Sonatype Nexus Snapshots</name>
+        <url>http://oss.sonatype.org/content/repositories/snapshots</url>
+
+    </repository>
+    -->
+  </repositories>
   <dependencies>
     <dependency>
       <groupId>junit</groupId>

+ 11 - 2
src/main/java/com/persagy/controller/OrdinaryController.java

@@ -1,5 +1,6 @@
 package com.persagy.controller;
 
+import com.fasterxml.jackson.databind.ObjectMapper;
 import com.persagy.domain.*;
 import com.persagy.service.ReservationService;
 import com.persagy.service.RoomService;
@@ -8,6 +9,7 @@ import org.springframework.stereotype.Controller;
 import org.springframework.ui.Model;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.ResponseBody;
 
 import javax.annotation.Resource;
 import java.util.List;
@@ -25,8 +27,15 @@ public class OrdinaryController {
     @Resource(name = "reservationServiceImpl")
     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;
+    }
 
     /*<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<会议室信息管理>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>*/
     // 会议室信息显示

+ 2 - 2
src/main/webapp/WEB-INF/web.xml

@@ -59,7 +59,7 @@
   </filter-mapping>
 
   <!--Shiro拦截器 shiro入口-->
-  <filter>
+  <!--<filter>
     <filter-name>shiroFilter</filter-name>
     <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
     <init-param>
@@ -70,6 +70,6 @@
   <filter-mapping>
     <filter-name>shiroFilter</filter-name>
     <url-pattern>/*</url-pattern>
-  </filter-mapping>
+  </filter-mapping>-->
 
 </web-app>