package com.cn.action;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import com.cn.domain.User;
@Controller
public class UserAction {
@RequestMapping("/login")
public ModelAndView login(String name, int age) {
System.out.println(name + age);
return null;
}
@RequestMapping("/selectAll")
@ResponseBody
public Object selectAll() {
System.out.println("/selectAll");
User user = new User();
user.setId(1);
user.setPassword("123");
user.setUserName("zhangsan");
return user;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
springMVC整合json
共36个文件
jar:17个
xml:5个
class:2个
5星 · 超过95%的资源 需积分: 12 72 下载量 16 浏览量
2012-12-25
12:43:30
上传
评论
收藏 4.58MB ZIP 举报
温馨提示
本人亲测跑通的spring集成json的demo,原因很简单,现在网上的大部分例子都存在或多或少的问题,方便自己也就是方便他人!
资源推荐
资源详情
资源评论
收起资源包目录
SpringMVC_Json.zip (36个子文件)
SpringMVC_Json
WebContent
META-INF
MANIFEST.MF 39B
WEB-INF
web.xml 1KB
dispatcherServlet-servlet.xml 2KB
jsp
lib
org.springframework.context-3.1.2.RELEASE.jar 813KB
org.springframework.jdbc-3.1.2.RELEASE.jar 395KB
org.springframework.beans-3.1.2.RELEASE.jar 578KB
aopalliance-1.0.jar 4KB
org.springframework.aop-3.1.2.RELEASE.jar 325KB
org.springframework.core-3.1.2.RELEASE.jar 439KB
jstl.jar 17KB
commons-logging.jar 54KB
org.springframework.web.servlet-3.1.2.RELEASE.jar 564KB
org.springframework.web-3.1.2.RELEASE.jar 536KB
commons-pool-1.3.jar 61KB
jackson-core-asl-1.8.4.jar 222KB
org.springframework.asm-3.1.2.RELEASE.jar 52KB
commons-dbcp-1.2.2.jar 119KB
org.springframework.expression-3.1.2.RELEASE.jar 172KB
org.springframework.transaction-3.1.2.RELEASE.jar 239KB
jackson-mapper-asl-1.8.4.jar 652KB
js
jquery-1.8.3.min.js 91KB
index.jsp 1KB
.settings
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml 345B
org.eclipse.wst.common.component 505B
org.eclipse.wst.jsdt.ui.superType.container 49B
.jsdtscope 503B
org.eclipse.jdt.core.prefs 395B
src
com
cn
action
UserAction.java 712B
domain
User.java 562B
UserMapper.xml 332B
.project 1KB
.classpath 2KB
build
classes
com
cn
action
UserAction.class 1KB
domain
User.class 968B
UserMapper.xml 332B
共 36 条
- 1
lsdbestboy
- 粉丝: 0
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
- 3
- 4
前往页