1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package com.northglass.web.manage;
 
import java.util.HashMap;
import java.util.Map;
 
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
 
import com.northglass.service.TelecomsService.TelecomsService;
 
import net.sf.json.JSONObject;
 
@Controller
@RequestMapping(value="/text")
public class CutManageController {
 
    @RequestMapping(method=RequestMethod.GET, value="/text")
    @ResponseBody
    public JSONObject checkTask(HttpServletRequest request,HttpServletResponse response){
        JSONObject jsonObj = new JSONObject();
        Map<String,Object> map = new HashMap<String,Object>();
        map.put("firstName", "jack");
        jsonObj.putAll(map);
        return jsonObj;
    }
    @RequestMapping(method=RequestMethod.GET, value="/paiText")
    @ResponseBody
    public JSONObject paiText(HttpServletRequest request,HttpServletResponse response){
        return TelecomsService.jsonObj;
    }
}