91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 34.6MB
    文件類(lèi)型: .rar
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2023-07-04
  • 語(yǔ)言: 其他
  • 標(biāo)簽: SSH案例??SSH整合??

資源簡(jiǎn)介

本案例是一個(gè)ssh整合案例,注意:本案例采用的框架是Spring+Springmvc+hibernate

資源截圖

代碼片段和文件信息

package?cn.lyl.ssm.controller;

import?java.util.List;

import?javax.servlet.http.HttpServletRequest;

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?org.springframework.web.bind.annotation.RequestParam;
import?org.springframework.web.servlet.ModelAndView;

import?cn.lyl.ssm.po.Items;
import?cn.lyl.ssm.po.ItemsCustom;
import?cn.lyl.ssm.po.ItemsQueryVo;
import?cn.lyl.ssm.service.impl.ItemsService;

/**
?*?

title:ItemsController


?*?

Description:?商品的controller


?*?@author?李銀龍
?* 2017年8月5日
?* 下午9:24:40
?*/
@Controller
//為了對(duì)url進(jìn)行分類(lèi)管理,可以在這里定義根路徑,最終訪問(wèn)url是根路徑+子路徑
//比如:商品列表://items/queryItems.action
@RequestMapping(“/items“)
public?class?ItemsController?{
@Autowired
private?ItemsService?itemsService;
//商品查詢列表
//@RequestMapping實(shí)現(xiàn)方法和url進(jìn)行映射
//一般建議url和方法名寫(xiě)成一樣,queryItems可以加action后綴
@RequestMapping(“/queryItems“)
public?ModelAndView?queryItems(HttpServletRequest?requestItemsQueryVo?itemsQueryVo)?throws?Exception{

//調(diào)用service查詢數(shù)據(jù)庫(kù),查詢商品列表,這里使用靜態(tài)數(shù)據(jù)模擬
List?itemsList?=?itemsService.findItemsList(itemsQueryVo);
//返回ModelAndView
ModelAndView?modelAndView?=?new?ModelAndView();
//相當(dāng)于request的setAttribute方法
modelAndView.addobject(“itemsList“?itemsList);
//指定視圖
modelAndView.setViewName(“itemsList“);
return?modelAndView;
}


//商品信息修改頁(yè)面顯示
// @RequestMapping(“/editItems“)
//限制http請(qǐng)求方法
// @RequestMapping(value=“/editItems“method={RequestMethod.POSTRequestMethod.GET})
// public?ModelAndView?editItems()?throws?Exception{
//
// //調(diào)用service根據(jù)id查詢商品信息
// ItemsCustom?itemsCustom?=?itemsService.findItemsById(4);
//
// ModelAndView?modelAndView?=?new?ModelAndView();
// //將商品信息放到model中
// modelAndView.addobject(“itemsCustom“?itemsCustom);
// //指定視圖
// modelAndView.setViewName(“items/editItems“);
// return?modelAndView;
// }
//@RequestParam(value=“id“)里邊指定request傳入?yún)?shù)名稱(chēng)和形參進(jìn)行綁定。
//通過(guò)required屬性指定參數(shù)是否必須傳入
//通過(guò)defaultValue可以設(shè)置默認(rèn)值,如果id參數(shù)沒(méi)有傳入,將默認(rèn)值和形參綁定。
@RequestMapping(value=“/editItems“method={RequestMethod.POSTRequestMethod.GET})
public?String?editItems(Model?modelHttpServletRequest?request@RequestParam(value=“id“required=true)Integer?items_id)?throws?Exception{

//調(diào)用service根據(jù)id查詢商品信息
ItemsCustom?itemsCustom?=?itemsService.findItemsById(items_id);

//通過(guò)形參中的model將model數(shù)據(jù)傳到頁(yè)面
//此方法和modelandview方法相當(dāng)
model.addAttribute(“itemsCustom“itemsCustom);
return?“editItems“;
}

//商品信息修改提交
@RequestMapping(“/editItemsSubmit“)
public?String?editItemsSubmit(HttpServletRequest?requestInteger?idItemsCustom?itemsCustom)?throws?Exception{

//調(diào)用service更新商品信息,頁(yè)面需要將商品信息傳到此方法
//重定向
itemsService.updateItems(id?itemsCustom);
// return?“redirect:queryItems.action“;
return?“succe

?屬性????????????大小?????日期????時(shí)間???名稱(chēng)
-----------?---------??----------?-----??----

?????文件???????1283??2017-08-08?10:11??sshDemo\.classpath

?????文件?????????12??2017-08-08?09:45??sshDemo\.git\COMMIT_EDITMSG

?????文件????????254??2017-08-08?09:46??sshDemo\.git\config

?????文件?????????23??2017-08-07?19:09??sshDemo\.git\HEAD

?????文件???????9592??2017-08-08?09:45??sshDemo\.git\index

?????文件????????775??2017-08-08?09:45??sshDemo\.git\logs\HEAD

?????文件????????775??2017-08-08?09:45??sshDemo\.git\logs\refs\heads\master

?????文件????????447??2017-08-08?09:50??sshDemo\.git\logs\refs\remotes\origin\master

?????文件????????663??2017-08-07?19:09??sshDemo\.git\objects\00\8e7aeed81823246e087fdfebc4bf73a5c41326

?????文件??????36548??2017-08-07?19:09??sshDemo\.git\objects\01\43c099699ee843cde6d95c9dbc7751039d2463

?????文件????????138??2017-08-07?19:09??sshDemo\.git\objects\04\3ba24236a69e0216d25e6927478b94e4515119

?????文件??????17204??2017-08-07?19:09??sshDemo\.git\objects\04\78a8cb02a01f88ecb9b75219841961583dccf5

?????文件?????674649??2017-08-07?19:09??sshDemo\.git\objects\05\39039f716034c4896c8eaa81c075c7fa3bc997

?????文件?????????21??2017-08-07?19:09??sshDemo\.git\objects\05\bd71b6ec2c1982d1e8a5653073281994564ae8

?????文件?????????61??2017-08-07?19:09??sshDemo\.git\objects\06\3083ba5947bf3e8f244b304285737193e73afe

?????文件???????1256??2017-08-07?19:09??sshDemo\.git\objects\06\9e9f8a6a08a3b0f9e30807ece5aed081a1ef99

?????文件????????474??2017-08-07?21:02??sshDemo\.git\objects\07\56bdd34aa09195793033deafb51896d0e5cdd0

?????文件?????334090??2017-08-07?19:09??sshDemo\.git\objects\08\9e78ffd4895b37d94c003ba60b959f9e204aa4

?????文件?????????45??2017-08-07?19:09??sshDemo\.git\objects\08\d292a85e8fae9dff891a94055245195220081b

?????文件???????6656??2017-08-07?19:09??sshDemo\.git\objects\0a\f7c25c4def8edabc746e9763e2a988a84d4dbf

?????文件????????317??2017-08-07?19:09??sshDemo\.git\objects\0f\2b020528723551be420d76d0acfaa1b01efa3c

?????文件?????367783??2017-08-07?19:09??sshDemo\.git\objects\0f\d275e94660402f80f01505d28b90a23f7e0209

?????文件?????981837??2017-08-07?19:09??sshDemo\.git\objects\13\baf5ef5e765d263ff31b5c91eae48e91c950e8

?????文件????1455490??2017-08-07?19:09??sshDemo\.git\objects\16\c6d9e01cce36aa629ab66ae6e3ee97bb52f4a4

?????文件?????715290??2017-08-07?19:09??sshDemo\.git\objects\17\109f2b17f657bb2b6d2cf5c1632b3f13cb9ece

?????文件?????442781??2017-08-07?19:09??sshDemo\.git\objects\1d\425cf7d7e25f81be64d32c406ff66cfb6c4766

?????文件?????????58??2017-08-07?19:09??sshDemo\.git\objects\1d\86c7a6733ced379a802a79612257449aaedbe7

?????文件???????1395??2017-08-07?19:09??sshDemo\.git\objects\20\e2400b77fb2fed3e945f63e5f5d36f96dbf8a4

?????文件????????101??2017-08-07?19:09??sshDemo\.git\objects\22\9c6689062c62e151fb03b7431a3800b4b23f79

?????文件???????9486??2017-08-07?19:09??sshDemo\.git\objects\23\b1ebe62a2221d9f00986bf4a6b7c7b0d428fbb

............此處省略346個(gè)文件信息

評(píng)論

共有 條評(píng)論