package contorller;
import java.text.SimpleDateFormat;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import org.springframework.beans.propertyeditors.CustomDateEditor;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.WebDataBinder;
import org.springframework.web.bind.annotation.InitBinder;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import Service.ICwService;
import Vo.Cw;
@Controller
@RequestMapping("cw")
public class CwContorller
{
@InitBinder
public void initBinder(WebDataBinder binder) //重写属性粘合方法
{
//注意SimpleDateFormat中声明的格式,必须和页面相对应
binder.registerCustomEditor(java.util.Date.class, new CustomDateEditor(new SimpleDateFormat("yyyy-MM-dd"), true));
}
@Resource(name="cwService")
private ICwService cwService;
public ICwService getCwService() {
return cwService;
}
public void setCwService(ICwService cwService) {
this.cwService = cwService;
}
@RequestMapping("query")
public ModelAndView MoviQuery()
{
List<Map<String,Object>> list=cwService.CwQuery();
ModelAndView mav=new ModelAndView();
mav.addObject("list", list);
mav.setViewName("/Query.jsp");
return mav;
}
@RequestMapping("add")
public ModelAndView Add(Cw cw)
{
System.out.println(cw);
cwService.Add(cw);
ModelAndView mav=new ModelAndView();
mav.setViewName("redirect:/cw/query.do");
return mav;
}
@RequestMapping("sc")
public ModelAndView Delete(String cwid)
{
cwService.CwDelete(cwid);
ModelAndView mav=new ModelAndView();
mav.setViewName("redirect:/cw/query.do");
return mav;
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
JAVA课设大作业SSM(宠物管理)
共67个文件
jar:38个
xml:8个
class:5个
需积分: 50 18 下载量 123 浏览量
2018-08-03
11:12:28
上传
评论 8
收藏 12.17MB ZIP 举报
温馨提示
本项目由SSM(Spring+SpringMVC+MyBatis)框架集写的,即由Spring、SpringMVC、MyBatis三个开源框架整合而成,常作为数据源较简单的web项目的框架。
资源推荐
资源详情
资源评论
收起资源包目录
宠物管理.zip (67个子文件)
宠物管理
WebContent
Query.jsp 1KB
META-INF
MANIFEST.MF 39B
WEB-INF
web.xml 2KB
lib
spring-beans-3.2.0.M2.jar 586KB
commons-beanutils-1.9.3.jar 240KB
spring-orm-3.2.0.M2.jar 375KB
spring-webmvc-portlet-3.2.0.M2.jar 184KB
spring-core-3.2.0.M2.jar 813KB
com.springsource.org.aspectj.weaver-1.6.8.RELEASE.jar 1.57MB
com.springsource.org.apache.commons.pool-1.5.3.jar 95KB
spring-test-3.2.0.M2.jar 225KB
spring-struts-3.2.0.M2.jar 35KB
mybatis-spring-1.2.1.jar 48KB
spring-webmvc-3.2.0.M2.jar 596KB
jackson-databind-2.1.0.jar 899KB
commons-io-2.0.1.jar 156KB
spring-aop-3.2.0.M2.jar 325KB
spring-jdbc-3.2.0.M2.jar 389KB
ojdbc14.jar 1.47MB
com.springsource.org.apache.log4j-1.2.15.jar 387KB
com.springsource.org.apache.commons.dbcp-1.2.2.osgi.jar 120KB
spring-jms-3.2.0.M2.jar 196KB
servlet-api.jar 86KB
com.springsource.org.aopalliance-1.0.0.jar 5KB
jackson-core-2.1.0.jar 201KB
spring-instrument-tomcat-3.2.0.M2.jar 10KB
com.springsource.com.mchange.v2.c3p0-0.9.1.2.jar 603KB
spring-instrument-3.2.0.M2.jar 7KB
commons-logging.jar 54KB
spring-tx-3.2.0.M2.jar 235KB
spring-expression-3.2.0.M2.jar 170KB
spring-oxm-3.2.0.M2.jar 71KB
commons-fileupload-1.2.2.jar 58KB
jstl-1.2.jar 405KB
spring-web-3.2.0.M2.jar 582KB
spring-context-support-3.2.0.M2.jar 107KB
mybatis-3.1.1.jar 636KB
spring-aspects-3.2.0.M2.jar 68KB
mysql-connector-java-5.1.22-bin.jar 813KB
jackson-annotations-2.1.0.jar 33KB
spring-context-3.2.0.M2.jar 813KB
add.jsp 914B
index.jsp 419B
.settings
org.eclipse.wst.jsdt.ui.superType.name 6B
org.eclipse.wst.common.project.facet.core.xml 345B
org.eclipse.wst.common.component 478B
org.eclipse.wst.jsdt.ui.superType.container 49B
.jsdtscope 503B
org.eclipse.jdt.core.prefs 364B
src
dao
ICwDao.java 733B
Service
CwServiceImpl.java 812B
ICwService.java 233B
springmvc.xml 1KB
contorller
CwContorller.java 2KB
Vo
Cw.java 1KB
spring.xml 2KB
mybatis.xml 289B
.project 1KB
.classpath 841B
build
classes
dao
ICwDao.class 871B
Service
ICwService.class 314B
CwServiceImpl.class 1KB
springmvc.xml 1KB
contorller
CwContorller.class 3KB
Vo
Cw.class 2KB
spring.xml 2KB
mybatis.xml 289B
共 67 条
- 1
资源评论
程序猫喵
- 粉丝: 0
- 资源: 6
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功