資源簡介
基于IDEA進行的SSM框架整合,已經過測試,拿來既用,相關的介紹寫在了博客里https://blog.csdn.net/qq_31749835/article/details/90173874。相關解釋已經添加了注釋,歡迎下載。
代碼片段和文件信息
package?com.shiep.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?com.shiep.pojo.Customer;
import?com.shiep.pojo.Login;
import?com.shiep.pojo.QueryVo;
import?com.shiep.service.CustomerService;
@Controller
@RequestMapping(“customer“)
public?class?CustomerController?{
@Autowired
private?CustomerService?customerService;
@RequestMapping(“list.do“)
public?String?list(QueryVo?voModel?model)?{
List?listAll?=?customerService.selectPageByQueryVo(vo);
model.addAttribute(“listAll“?listAll);
model.addAttribute(“custName“?vo.getCustName());
model.addAttribute(“custSource“vo.getCustSource());
model.addAttribute(“custIndustry“?vo.getCustIndustry());
model.addAttribute(“custLevel“?vo.getCustLevel());
return?“list“;
}
@RequestMapping(value=“edit.do“)
public??String?edit(?Integer?idModel?model){?
Customer?customerById?=?customerService.selectCustomerById(id);
model.addAttribute(“customerById“?customerById);
return?“update“;
}
@RequestMapping(value=“update.do“)
public?String?update(?Customer?customer){
customerService.updateCustomerById(customer);
return?“list“;?
}
@RequestMapping(value=“delete.do“)
public??String?delete(?Integer?id){
customerService.deleteCustomerById(id);
return?“list“;??
}
@RequestMapping(value=“tosave.do“)
private?String?tosave()?{
return?“save“;
}
@RequestMapping(value=“save.do“)
public??String?save(?Customer?customer){
customerService.saveCustomer(customer);
return?“list“;?
}
@RequestMapping(“login.do“)
public?String?login(Login?vo){
vo=this.customerService.customerLogin(vo);
if(vo!=null){
return?“main“;
}else?{
return?“error“;
}
}
}
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件?????????842??2018-04-25?19:22??ssm_curd\.classpath
?????文件?????????908??2018-04-25?18:19??ssm_curd\.project
?????目錄???????????0??2018-05-14?18:58??ssm_curd\.settings\
?????文件?????????567??2018-04-25?18:19??ssm_curd\.settings\.jsdtscope
?????文件??????????81??2018-05-14?18:58??ssm_curd\.settings\org.eclipse.core.resources.prefs
?????文件?????????364??2018-04-25?18:19??ssm_curd\.settings\org.eclipse.jdt.core.prefs
?????文件?????????476??2018-04-25?19:22??ssm_curd\.settings\org.eclipse.wst.common.component
?????文件?????????345??2018-04-25?18:19??ssm_curd\.settings\org.eclipse.wst.common.project.facet.core.xm
?????文件??????????49??2018-04-25?18:19??ssm_curd\.settings\org.eclipse.wst.jsdt.ui.superType.container
?????文件???????????6??2018-04-25?18:19??ssm_curd\.settings\org.eclipse.wst.jsdt.ui.superType.name
?????目錄???????????0??2018-04-25?18:19??ssm_curd\build\
?????目錄???????????0??2018-05-14?19:09??ssm_curd\build\classes\
?????目錄???????????0??2018-05-13?14:35??ssm_curd\build\classes\com\
?????目錄???????????0??2018-05-14?17:44??ssm_curd\build\classes\com\shiep\
?????目錄???????????0??2018-05-13?14:35??ssm_curd\build\classes\com\shiep\controller\
?????文件????????3018??2018-05-14?20:37??ssm_curd\build\classes\com\shiep\controller\CustomerController.class
?????目錄???????????0??2018-05-14?18:54??ssm_curd\build\classes\com\shiep\mapper\
?????文件?????????654??2018-05-14?18:53??ssm_curd\build\classes\com\shiep\mapper\CustomerDao.class
?????文件????????3117??2018-05-14?18:54??ssm_curd\build\classes\com\shiep\mapper\CustomerDao.xm
?????目錄???????????0??2018-05-14?18:32??ssm_curd\build\classes\com\shiep\pojo\
?????文件????????3250??2018-05-14?18:13??ssm_curd\build\classes\com\shiep\pojo\Customer.class
?????文件????????1169??2018-05-14?18:35??ssm_curd\build\classes\com\shiep\pojo\Login.class
?????文件????????1141??2018-05-14?18:14??ssm_curd\build\classes\com\shiep\pojo\QueryVo.class
?????目錄???????????0??2018-05-13?17:02??ssm_curd\build\classes\com\shiep\service\
?????文件?????????584??2018-05-14?18:53??ssm_curd\build\classes\com\shiep\service\CustomerService.class
?????文件????????1712??2018-05-14?18:53??ssm_curd\build\classes\com\shiep\service\CustomerServiceImpl.class
?????文件?????????143??2018-05-14?19:09??ssm_curd\build\classes\jdbc.properties
?????文件?????????266??2016-11-03?09:17??ssm_curd\build\classes\log4j.properties
?????目錄???????????0??2018-05-14?18:13??ssm_curd\build\classes\mybatis\
?????文件?????????280??2018-04-25?18:31??ssm_curd\build\classes\mybatis\SqlMapConfig.xm
?????目錄???????????0??2018-05-14?18:13??ssm_curd\build\classes\spring\
............此處省略81個文件信息
評論
共有 條評論