• 大小: 14.9MB
    文件类型: .rar
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: 其他
  • 标签: maven  ssm  spring  idea  

资源简介

一个crud的例子(完整的前后端例子),用maven+ssm(spring+springmvc+mybatis)写的。可在idea ,eclipse ,myeclipse 等等ide上使用

资源截图

代码片段和文件信息

package org.java.controller;

import java.util.List;

import javax.servlet.http.HttpSession;

import org.java.pojo.Tests;
import org.java.service.TestsService;
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.servlet.ModelAndView;

@Controller
public class TestsController {
@Autowired
private TestsService testsservice;
/**
 * 查询所有用户
 * @return
 */
@RequestMapping(“/select“)
public ModelAndView select(HttpSession session){
List ts=(List) testsservice.selects();
ModelAndView mv=new ModelAndView();
mv.addobject(“ts“ ts);
mv.setViewName(“index.jsp“);
return mv;
}
/**
 * 根据id查询用户
 */
@RequestMapping(“/selectid“)
public String selectid(Integer idModel model){
Tests testid= testsservice.selectid(id);
model.addAttribute(“testid“ testid);
return “updates.jsp“;

}
/**
 * 新增用户
 * @return
 */
@RequestMapping(“/insert“)
public String insert(Tests tests){
testsservice.insert(tests);
return “select.action“;
}
/**
 * 根据id删除用户
 * @return
 */
@RequestMapping(“/delete“)
public String delete(Integer id){
testsservice.delete(id);
return “select.action“;

}
/**
 * 修改用户
 * @return
 */
@RequestMapping(“/update“)
public String update(Tests tests){
testsservice.update(tests);
return “select.action“;

}
}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件       1513  2016-04-08 14:24  featherd\.classpath

     文件        290  2016-04-19 09:08  featherd\.idea\artifacts\featherd_war.xml

     文件       4319  2016-04-19 09:08  featherd\.idea\artifacts\featherd_war_exploded.xml

     文件       1192  2016-04-19 09:08  featherd\.idea\compiler.xml

     文件         76  2016-04-19 09:07  featherd\.idea\copyright\profiles_settings.xml

     文件        238  2016-04-19 09:07  featherd\.idea\encodings.xml

     文件        538  2016-04-19 09:08  featherd\.idea\libraries\Maven__aopalliance_aopalliance_1_0.xml

     文件        492  2016-04-19 09:08  featherd\.idea\libraries\Maven__asm_asm_all_3_3_1.xml

     文件        528  2016-04-19 09:08  featherd\.idea\libraries\Maven__cglib_cglib_nodep_2_2_2.xml

     文件        560  2016-04-19 09:08  featherd\.idea\libraries\Maven__commons_codec_commons_codec_1_8.xml

     文件        563  2016-04-19 09:08  featherd\.idea\libraries\Maven__commons_dbcp_commons_dbcp_1_2_2.xml

     文件        596  2016-04-19 09:08  featherd\.idea\libraries\Maven__commons_logging_commons_logging_1_1_3.xml

     文件        549  2016-04-19 09:08  featherd\.idea\libraries\Maven__commons_pool_commons_pool_1_3.xml

     文件        549  2016-04-19 09:08  featherd\.idea\libraries\Maven__com_sun_mail_javax_mail_1_5_0.xml

     文件        551  2016-04-19 09:08  featherd\.idea\libraries\Maven__javax_activation_activation_1_1.xml

     文件        507  2016-04-19 09:08  featherd\.idea\libraries\Maven__javax_javaee_api_7_0.xml

     文件        602  2016-04-19 09:08  featherd\.idea\libraries\Maven__javax_servlet_javax_servlet_api_3_0_1.xml

     文件        461  2016-04-19 09:08  featherd\.idea\libraries\Maven__jstl_jstl_1_2.xml

     文件        479  2016-04-19 09:08  featherd\.idea\libraries\Maven__junit_junit_4_11.xml

     文件        493  2016-04-19 09:08  featherd\.idea\libraries\Maven__log4j_log4j_1_2_17.xml

     文件        598  2016-04-19 09:08  featherd\.idea\libraries\Maven__mysql_mysql_connector_java_5_1_30.xml

     文件        693  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_apache_directory_studio_org_apache_commons_codec_1_8.xml

     文件        566  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_aspectj_aspectjweaver_1_6_2.xml

     文件        614  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_bouncycastle_bcprov_ext_jdk15on_1_50.xml

     文件        630  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_codehaus_jackson_jackson_core_asl_1_9_13.xml

     文件        644  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_codehaus_jackson_jackson_mapper_asl_1_9_13.xml

     文件        556  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_hamcrest_hamcrest_core_1_3.xml

     文件        524  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_mybatis_mybatis_3_2_6.xml

     文件        573  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_mybatis_mybatis_spring_1_2_2.xml

     文件        530  2016-04-19 09:08  featherd\.idea\libraries\Maven__org_slf4j_slf4j_api_1_7_7.xml

............此处省略174个文件信息

评论

共有 条评论