package com.yeshi.fanli.controller.admin; import java.io.PrintWriter; import java.util.List; import javax.annotation.Resource; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; import com.yeshi.fanli.entity.system.System; import com.yeshi.fanli.service.inter.config.SystemService; import org.yeshi.utils.JsonUtil; import net.sf.json.JSONObject; @Controller @RequestMapping("admin/new/api/v1/system") public class SystemAdminController { @Resource private SystemService systemService; @RequestMapping(value="/systemList",method=RequestMethod.POST) public void getSystems(PrintWriter out){ List systems = systemService.getSystems(); JSONObject data = new JSONObject(); data.put("systemList", systems); out.print(JsonUtil.loadTrueResult(data)); } }