package com.how2java.controller;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.how2java.pojo.Category;
import com.how2java.service.CategoryService;
// 告诉spring mvc这是一个控制器类
@Controller
@RequestMapping("")
public class CategoryController {
@Autowired
CategoryService categoryService;
@RequestMapping("listCategory")
public ModelAndView listCategory(){
ModelAndView mav = new ModelAndView();
List<Category> cs= categoryService.list();
// 放入转发参数
mav.addObject("cs", cs);
// 放入jsp路径
mav.setViewName("listCategory");
return mav;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
SSM.zip (99个子文件)
ssm
.project 1KB
.settings
.jsdtscope 567B
org.eclipse.core.resources.prefs 57B
org.eclipse.wst.common.component 461B
org.eclipse.jdt.core.prefs 364B
org.eclipse.wst.common.project.facet.core.xml 305B
org.eclipse.wst.jsdt.ui.superType.container 49B
org.eclipse.wst.jsdt.ui.superType.name 6B
src
log4j.properties 333B
com
how2java
controller
CategoryController.java 844B
UserController.java 809B
mapper
User.xml 828B
CategoryMapper.java 464B
UserMapper.java 472B
Category.xml 873B
service
UserService.java 185B
impl
CategoryServiceImpl.java 506B
UserServiceImpl.java 467B
CategoryService.java 165B
pojo
User.java 404B
Category.java 412B
applicationContext.xml 2KB
springMVC.xml 2KB
build
classes
log4j.properties 333B
com
how2java
controller
CategoryController.class 1KB
UserController.class 1KB
mapper
User.xml 828B
CategoryMapper.class 395B
Category.xml 873B
UserMapper.class 379B
service
UserService.class 227B
impl
CategoryServiceImpl.class 821B
UserServiceImpl.class 789B
CategoryService.class 239B
pojo
User.class 1012B
Category.class 1KB
applicationContext.xml 2KB
springMVC.xml 2KB
WebContent
WEB-INF
web.xml 1KB
jsp
listCategory.jsp 488B
listUser.jsp 708B
lib
spring-beans-3.2.16.RELEASE.jar 600KB
hamcrest-all-1.3.jar 299KB
mysql-connector-java-5.1.6-bin.jar 687KB
spring-test-3.2.16.RELEASE.jar 448KB
spring-jdbc-3.2.16.RELEASE.jar 397KB
spring-aspects-3.2.16.RELEASE.jar 50KB
jstl-1.2.jar 405KB
spring-webmvc-3.2.16.RELEASE.jar 627KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
jackson-databind-2.5.4.jar 1.09MB
jackson-core-2.5.4.jar 225KB
spring-core-3.2.16.RELEASE.jar 865KB
spring-context-3.2.16.RELEASE.jar 848KB
jackson-annotations-2.5.0.jar 39KB
servlet-api.jar 193KB
spring-web-3.2.16.RELEASE.jar 617KB
spring-aop-3.2.16.RELEASE.jar 331KB
mybatis-spring-1.2.3.jar 50KB
spring-expression-3.2.16.RELEASE.jar 192KB
fastjson-1.2.7.jar 407KB
junit-4.12.jar 308KB
com.springsource.org.apache.log4j-1.2.15.jar 387KB
druid-1.0.15.jar 1.86MB
spring-tx-3.2.16.RELEASE.jar 237KB
com.springsource.org.apache.commons.logging-1.1.1.jar 60KB
mybatis-3.1.1.jar 636KB
META-INF
MANIFEST.MF 39B
js
list
listUser.js 29B
jQuery
jquery-1.7.1.js 242KB
jsp
index.html 283B
.classpath 409B
how2java.sql 1KB
jar
spring-beans-3.2.16.RELEASE.jar 600KB
hamcrest-all-1.3.jar 299KB
mysql-connector-java-5.1.6-bin.jar 687KB
spring-test-3.2.16.RELEASE.jar 448KB
spring-jdbc-3.2.16.RELEASE.jar 397KB
spring-aspects-3.2.16.RELEASE.jar 50KB
jstl-1.2.jar 405KB
spring-webmvc-3.2.16.RELEASE.jar 627KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
jackson-databind-2.5.4.jar 1.09MB
jackson-core-2.5.4.jar 225KB
spring-core-3.2.16.RELEASE.jar 865KB
spring-context-3.2.16.RELEASE.jar 848KB
jackson-annotations-2.5.0.jar 39KB
servlet-api.jar 193KB
spring-web-3.2.16.RELEASE.jar 617KB
spring-aop-3.2.16.RELEASE.jar 331KB
mybatis-spring-1.2.3.jar 50KB
spring-expression-3.2.16.RELEASE.jar 192KB
fastjson-1.2.7.jar 407KB
junit-4.12.jar 308KB
com.springsource.org.apache.log4j-1.2.15.jar 387KB
druid-1.0.15.jar 1.86MB
spring-tx-3.2.16.RELEASE.jar 237KB
com.springsource.org.apache.commons.logging-1.1.1.jar 60KB
mybatis-3.1.1.jar 636KB
共 99 条
- 1
资源评论
奔跑的IQ
- 粉丝: 3
- 资源: 4
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功