• 大小: 11.72MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-06-19
  • 语言: 其他
  • 标签: springmvc  

资源简介

springmvc案例源码+session+增删改查+登录案例springmvc案例源码+session+增删改查+登录案例springmvc案例源码+session+增删改查+登录案例

资源截图

代码片段和文件信息

package com.zhao.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.zhao.pojo.Article;
import com.zhao.service.ArticleService;

@Controller
@RequestMapping(“/article“)
public class ArticleController {

@Autowired
ArticleService articleService;
@RequestMapping(“/list“)
public String ArticleList(Model model) {
List
 list = articleService.findAll();
model.addAttribute(“list“list);
System.out.print(“CCCCCCCCCCCCCC“ + list);
return “ArticleItemsList“;

}
@RequestMapping(“/edit“)
public String Edit(int idModel model){
Article article = articleService.findById(id);
model.addAttribute(“item“ article);
return “ArticleEditItem“;

}

@RequestMapping(value =“/saveOrUpdate“method = RequestMethod.POST)
public String saveOrUpdate(Article article){
articleService.update(article);
System.out.print(“vvvvvvvvvvvvv“ + article);
return “redirect:list“;

}

@RequestMapping(“/deleteByID“)
public String deleteByID(int id)
{
articleService.deleteById(id);
return “redirect:list“;

}

@RequestMapping(“/add“)
public String Add(){

return “AddArticle“;

}

@RequestMapping(“/addArticle“)
public String Insert(Article article){
articleService.insert(article);
return “redirect:list“;

}

}

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2017-09-22 14:43  springmvc\
     文件        1114  2017-03-03 07:18  springmvc\.classpath
     文件        1288  2017-03-03 07:18  springmvc\.project
     目录           0  2017-09-22 14:43  springmvc\.settings\
     文件         510  2017-03-03 07:18  springmvc\.settings\.jsdtscope
     文件          90  2017-03-03 07:18  springmvc\.settings\com.genuitec.eclipse.core.prefs
     文件         231  2017-09-23 14:43  springmvc\.settings\org.eclipse.core.resources.prefs
     文件         357  2017-03-03 07:18  springmvc\.settings\org.eclipse.jdt.core.prefs
     文件         554  2017-03-03 07:18  springmvc\.settings\org.eclipse.wst.common.component
     文件         403  2017-03-03 07:18  springmvc\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2017-03-03 07:18  springmvc\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2017-03-03 07:18  springmvc\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2017-09-25 11:20  springmvc\WebRoot\
     文件         808  2017-03-03 07:18  springmvc\WebRoot\Copy of index.jsp
     目录           0  2017-09-22 14:43  springmvc\WebRoot\meta-INF\
     文件          36  2017-03-03 07:18  springmvc\WebRoot\meta-INF\MANIFEST.MF
     目录           0  2017-09-22 14:43  springmvc\WebRoot\WEB-INF\
     目录           0  2017-09-25 08:36  springmvc\WebRoot\WEB-INF\classes\
     文件        3045  2017-03-03 07:18  springmvc\WebRoot\WEB-INF\classes\beans.xml
     目录           0  2017-09-25 08:36  springmvc\WebRoot\WEB-INF\classes\com\
     目录           0  2017-09-25 08:36  springmvc\WebRoot\WEB-INF\classes\com\zhao\
     目录           0  2017-09-25 10:02  springmvc\WebRoot\WEB-INF\classes\com\zhao\controller\
     文件        2804  2017-09-25 08:36  springmvc\WebRoot\WEB-INF\classes\com\zhao\controller\ArticleController.class
     文件        1733  2017-09-25 14:49  springmvc\WebRoot\WEB-INF\classes\com\zhao\controller\LoginController.class
     文件        2634  2017-09-25 15:20  springmvc\WebRoot\WEB-INF\classes\com\zhao\controller\UserController.class
     目录           0  2017-09-25 10:48  springmvc\WebRoot\WEB-INF\classes\com\zhao\mapper\
     文件         928  2017-09-25 08:36  springmvc\WebRoot\WEB-INF\classes\com\zhao\mapper\ArticleMapper.class
     文件        8010  2017-09-23 16:37  springmvc\WebRoot\WEB-INF\classes\com\zhao\mapper\ArticleMapper.xml
     文件         974  2017-09-25 11:30  springmvc\WebRoot\WEB-INF\classes\com\zhao\mapper\UserMapper.class
     文件        8404  2017-09-25 10:48  springmvc\WebRoot\WEB-INF\classes\com\zhao\mapper\UserMapper.xml
     目录           0  2017-09-25 08:36  springmvc\WebRoot\WEB-INF\classes\com\zhao\pojo\
............此处省略100个文件信息

评论

共有 条评论