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

资源简介

基于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.xml
     文件          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.xml
     目录           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.xml
     目录           0  2018-05-14 18:13  ssm_curd\build\classes\spring\
............此处省略81个文件信息

评论

共有 条评论