• 大小: 18MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-07-07
  • 语言: 其他
  • 标签: ssm整合  

资源简介

ssm整合实现商品查询和修改,用springmvc 和spring,mybatis来实现商品的查询和修改

资源截图

代码片段和文件信息

package com.jtr.item.controller;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.jtr.item.Domain.ItemCustor;
import com.jtr.item.Domain.ItemCustorPvo;
import com.jtr.item.service.Imp.ItemserviceImp;

@Controller
public class Itemcontroller {
@Autowired
private ItemserviceImp itemservice;
@Autowired
ItemCustorPvo itemCustorPvo;

/*
 * @Autowired private ItemCustor itemCustor;
 */
@RequestMapping(“/queryitem“)
public String queryitem(ItemCustor itemCustor Model model) {
itemCustorPvo.setItemCustor(itemCustor);
List findItems = itemservice.findItems(itemCustorPvo);

model.addAttribute(“itemlist“ findItems);

return “item“;
}
@RequestMapping(name=“/edititem“method= {RequestMethod.GETRequestMethod.POST})

   public String edititem(Integer idModel model)
   {       ItemCustor findByidItem = itemservice.findByidItem(id);
          model.addAttribute(“item“findByidItem);
return “editItem“;
   }
   @RequestMapping(“submit“)
   public String submit(ItemCustor itemCustor Model model)
   {   System.out.println(itemCustor.getCreatetime());
   itemCustorPvo.setItemCustor(itemCustor); 
   itemservice.updateItem(itemCustorPvo);
return “redirect:/queryitem.action“;
   
   }
   

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     文件        4767  2019-01-30 21:34  ssm_spring_items\.classpath
     文件         916  2019-01-30 19:32  ssm_spring_items\.project
     文件         567  2019-01-30 19:32  ssm_spring_items\.settings\.jsdtscope
     文件         364  2019-01-30 19:31  ssm_spring_items\.settings\org.eclipse.jdt.core.prefs
     文件         577  2019-01-30 21:21  ssm_spring_items\.settings\org.eclipse.wst.common.component
     文件         345  2019-01-30 19:32  ssm_spring_items\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2019-01-30 19:32  ssm_spring_items\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2019-01-30 19:32  ssm_spring_items\.settings\org.eclipse.wst.jsdt.ui.superType.name
     文件          39  2019-01-30 19:32  ssm_spring_items\WebContent\meta-INF\MANIFEST.MF
     文件        1650  2019-02-01 10:22  ssm_spring_items\WebContent\WEB-INF\jsp\editItem.jsp
     文件        1433  2019-01-31 19:47  ssm_spring_items\WebContent\WEB-INF\jsp\item.jsp
     文件     2029794  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\ant-1.9.6.jar
     文件       18392  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\ant-launcher-1.9.6.jar
     文件        4467  2019-01-29 21:48  ssm_spring_items\WebContent\WEB-INF\lib\aopalliance.jar
     文件       53259  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\asm-5.2.jar
     文件     1863302  2019-01-29 21:48  ssm_spring_items\WebContent\WEB-INF\lib\aspectjweaver-1.8.5.jar
     文件      302016  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\cglib-3.2.5.jar
     文件      160519  2019-01-29 12:34  ssm_spring_items\WebContent\WEB-INF\lib\commons-dbcp-1.4.jar
     文件       61829  2019-01-29 13:27  ssm_spring_items\WebContent\WEB-INF\lib\commons-logging-1.2.jar
     文件      111119  2019-01-29 12:34  ssm_spring_items\WebContent\WEB-INF\lib\commons-pool-1.6.jar
     文件      739582  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\javassist-3.22.0-GA.jar
     文件      489884  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\log4j-1.2.17.jar
     文件      135903  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\log4j-api-2.3.jar
     文件      827024  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\log4j-core-2.3.jar
     文件     1626073  2019-01-29 12:34  ssm_spring_items\WebContent\WEB-INF\lib\mybatis-3.4.6.jar
     文件       53557  2019-01-29 12:34  ssm_spring_items\WebContent\WEB-INF\lib\mybatis-spring-1.3.2.jar
     文件     2036609  2019-01-19 20:52  ssm_spring_items\WebContent\WEB-INF\lib\mysql-connector-java-8.0.11.jar
     文件      235590  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\ognl-3.1.16.jar
     文件       41203  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\slf4j-api-1.7.25.jar
     文件       12244  2019-01-29 12:33  ssm_spring_items\WebContent\WEB-INF\lib\slf4j-log4j12-1.7.25.jar
     文件      368931  2019-01-29 21:48  ssm_spring_items\WebContent\WEB-INF\lib\spring-aop-5.1.4.RELEASE.jar
............此处省略57个文件信息

评论

共有 条评论