资源简介
基于SSM框架的完整项目 Spring+SpringMVC+Mybatis+mysql 前段bootstrap 简单的一个后台管理系统
代码片段和文件信息
package com.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.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.entity.Community;
import com.service.CommunityService;
@Controller
// 定义该Controller的根访问路径 /admin
@RequestMapping(“/community“)
public class CommunityController {
// 注入UserService
@Autowired
private CommunityService communityService;
/**
*
* @param: @return
* @param: @throws Exception
* @return: ModelAndView
* @author zhanglei
* @Date 2016年9月3日 下午2:35:53
* @Description: 显示小区列表
*/
@RequestMapping(“/communitylist“)
public ModelAndView communitylist(String serach) throws Exception {
ModelAndView modelAndView = new ModelAndView();
Community community = new Community();
community.setCname(serach);
List communityList = communityService
.findCommunityList(community);
modelAndView.addobject(“communityList“ communityList);
modelAndView.setViewName(“community/admin_community_list“);
return modelAndView;
}
/**
*
* @param: @return
* @param: @throws Exception
* @return: String
* @author zhanglei
* @Date 2016年11月12日 上午11:08:49
* @Description: 显示添加小区页面
*/
@RequestMapping(“/add“)
public String add() throws Exception {
return “community/admin_community_add“;
}
/**
*
* @param: @param request
* @param: @param cname
* @param: @param address
* @param: @return
* @param: @throws Exception
* @return: String
* @author zhanglei
* @Date 2016年11月12日 上午11:09:04
* @Description: 添加小区
*/
@RequestMapping(“/add_do“)
public String add_do(HttpServletRequest request String cname
String address) throws Exception {
Community community = new Community();
community.setCname(cname);
community.setAddress(address);
community.setIsdelete(0);
communityService.add(community);
return “forward:communitylist.action“;
}
/**
*
* @param: @param id
* @param: @return
* @param: @throws Exception
* @return: ModelAndView
* @author zhanglei
* @Date 2016年11月12日 上午11:09:21
* @Description: 显示编辑小区页面
*/
@RequestMapping(“/edit“)
public ModelAndView edit(Integer id) throws Exception {
ModelAndView modelAndView = new ModelAndView();
Community communityinf = communityService.findCommunityById(id);
modelAndView.addobject(“communityinf“ communityinf);
modelAndView.setViewName(“community/admin_community_edit“);
return modelAndView;
}
/**
*
* @param: @param request
* @param: @param id
* @param: @param cname
* @param: @param address
* @param: @return
* @param: @throws Exception
* @return: String
* @author zhanglei
* @Date 2016年11月12日 上午11:09:34
* @Description: 编辑小区信息
*/
@RequestMa
相关资源
- Maven搭建Spring+Mybatis+MySql
- 最新_尚硅谷_mybatisplus_全套视频教程
- myBatis中文文档
- 基于SSM及前后端分离的复习系统
- 网上订餐系统 SSM框架
- springmvc+spring+mybatis+mysql数据库整合读
- SSM+mysql购书商城2018届毕设
- 框架写的简单学生管理系统
- SSM整合-商贸系统
- 基于vue全家桶nodejsexpressmysql实现的商
- SL会员商城
- oracle数据库 +springmvc框架 开发的增删
- 毕业设计体检预约系统-springmvc+mybat
- Springmvc+jdbc简单学生管理系统
- mybatis 整合oracle (含增删改查)
- 基于SSM框架的增删改查Ajax分页模糊查
- Struts2+spring+Mybatis+mysql+架包相对完善的
- Ajax+SpringMVC+Spring+Mybatis+MySql+js用户注册
- 基于springmvc、spring、mybatis、shiro、e
- SpingMVC+MyBatis简单权限管理系统
- Extjs+Mysql+SpringMVC+MyBatis通用后台管理系
- idea+springboot+oracle+mybatis
- SpringMVC+Mybatis+SQLServer整合源码 含数据
- 健身房管理系统
- SSM框架--Spring+SpringMVC+Mybatis整合
- SSM+bootstrap+mysql做的一个用户登录和权
- spring+springmvc+mybatis OA考勤管理系统带
- springMVC入门(员工系统-Mysql)代码简
- MyBatis的逆向工程——generatorSqlmapCus
- SSM+Shiro+Redis+Activiti-OA
评论
共有 条评论