package controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.alibaba.fastjson.JSON;
import dto.User;
import dto.UserPage;
import service.UserService;
@Controller
@RequestMapping("/")
// 访问前缀
public class UserController {
@Autowired
@Resource(name = "userService")
// 注入userService
private UserService userService;
@RequestMapping("helloworld1")
// 访问标识
@ResponseBody
public JSON queryUserByPage(HttpServletRequest request) {
String str=request.getParameter("id");
int id=Integer.parseInt(str);
System.out.println((JSON) JSON.toJSON(userService.queryUserByChild(id)));
JSON jsonList=(JSON) userService.queryUserByChild(id);
return jsonList;
}
@RequestMapping("helloworld")
// 访问标识
@ResponseBody
public JSON queryUserByFather() {
JSON jsonList=(JSON) JSON.toJSON(userService.queryUserByFather());
System.out.println(jsonList);
return jsonList;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SpringMVC Mabits Maven treeview动态数据 (104个子文件)
UserController.class 2KB
User.class 1KB
UserDAOImpl.class 1KB
UserPage.class 1KB
UserServiceImpl.class 914B
UserService.class 304B
UserDAO.class 292B
.classpath 1KB
org.eclipse.wst.common.component 749B
org.eclipse.wst.jsdt.ui.superType.container 49B
zTreeStyle.css 6KB
jquery.treeview.css 3KB
zTreeStandard.gif 5KB
treeview-red-line.gif 1010B
treeview-gray-line.gif 1010B
treeview-black-line.gif 1010B
treeview-default-line.gif 848B
ajax-loader.gif 649B
treeview-famfamfam.gif 545B
treeview-gray.gif 394B
treeview-red.gif 394B
treeview-default.gif 387B
treeview-black.gif 381B
loading.gif 381B
file.gif 109B
folder.gif 106B
folder-closed.gif 102B
plus.gif 61B
minus.gif 58B
line_conn.gif 45B
treeview-famfamfam-line.gif 37B
UserController.java 1KB
UserPage.java 1KB
UserDAOImpl.java 860B
User.java 807B
UserServiceImpl.java 714B
UserService.java 216B
UserDAO.java 204B
jquery.ztree.all-3.5.js 120KB
jquery-1.4.4.min.js 77KB
jquery-1.4.4.min.js 77KB
jquery.ztree.all-3.5.min.js 61KB
jquery.ztree.core-3.5.js 58KB
jquery.ztree.exedit-3.5.js 42KB
jquery.ztree.exedit.js 41KB
jquery.ztree.core-3.5.min.js 30KB
jquery.ztree.excheck-3.5.js 21KB
jquery.ztree.exedit-3.5.min.js 20KB
jquery.treeview.sortable.js 13KB
jquery.ztree.excheck-3.5.min.js 11KB
jquery.ztree.exhide-3.5.js 10KB
jquery.treeview.js 8KB
jquery.ztree.exhide-3.5.min.js 5KB
jquery.treeview.async.js 3KB
jquery.treeview.edit.js 2KB
.jsdtscope 639B
helloworld.jsp 4KB
updateUser.jsp 752B
index.jsp 695B
newUser.jsp 659B
NewFile.jsp 366B
MANIFEST.MF 104B
org.eclipse.wst.jsdt.ui.superType.name 6B
zTreeStandard.png 11KB
3.png 762B
5.png 710B
1_close.png 601B
1_open.png 580B
2.png 570B
7.png 534B
8.png 529B
9.png 467B
6.png 432B
4.png 399B
org.eclipse.jdt.core.prefs 430B
org.eclipse.core.resources.prefs 100B
org.eclipse.m2e.core.prefs 90B
org.eclipse.wst.validation.prefs 50B
.project 1KB
pom.properties 214B
pom.properties 210B
jdbc.properties 134B
jdbc.properties 134B
jdbc.properties 134B
spring.sql 3KB
pom.xml 4KB
pom.xml 4KB
spring-mybatis.xml 3KB
spring-mybatis.xml 3KB
spring-mybatis.xml 3KB
web.xml 2KB
spring-mvc.xml 1KB
spring-mvc.xml 1KB
applicationContext.xml 1KB
applicationContext.xml 1KB
applicationContext.xml 1KB
spring-mvc.xml 1KB
UserMapper.xml 771B
UserMapper.xml 771B
pom.xml 731B
共 104 条
- 1
- 2
资源评论
- goldenlake2018-02-26还没有弄懂,还在细看
怒气狂歌
- 粉丝: 0
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功