基于javaweb+mysql的springboot超市订单管理系统(java+springboot+jsp+mybatis+maven+mysql)

基于javaweb+mysql的springboot超市订单管理系统(java+springboot+jsp+mybatis+maven+mysql)

运行环境

Java≥8、MySQL≥5.7

开发工具

eclipse/idea/myeclipse/sts等均可配置运行

适用

课程设计,大作业,毕业设计,项目练习,学习演示等

功能说明

基于javaweb+mysql的SpringBoot超市订单管理系统(java+springboot+jsp+mybatis+maven+mysql)

项目介绍

该超市订单管理毕业设计基于jdk8版本开发,在部署时需要使用jdk8以上的版本。使用了目前流行的框架组合springboot+mybatis的框架技术, 实现了供应商管理对供应商实现增删改查、订单管理对超市订单实现增删改查、用户管理等功能,适用于小型超市的使用,通过学习该超市订单管理,对于springboot+mybatis框架的组合能够有更深层次的理解。

环境需要

1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.数据库:MySql 5.7版本;

6.是否Maven项目: 是

技术栈

  1. 后端:springboot MyBatis

  2. 前端:JSP+css+javascript

使用说明

  1. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 2. 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,配置tomcat,然后运行; 3. 将项目中application.yml配置文件中的数据库配置改为自己的配置; 4. 运行成功后,访问http://localhost:8080/ 到登录页面
		outPrintWriter.close();
	}

	private String modify(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String proContact = request.getParameter("proContact");
		String proPhone = request.getParameter("proPhone");
		String proAddress = request.getParameter("proAddress");
		String proFax = request.getParameter("proFax");
		String proDesc = request.getParameter("proDesc");
		String id = request.getParameter("id");
		Provider provider = new Provider();
		provider.setId(Integer.valueOf(id));
		provider.setProContact(proContact);
		provider.setProPhone(proPhone);
		provider.setProFax(proFax);
		provider.setProAddress(proAddress);
		provider.setProDesc(proDesc);
		provider.setModifyBy(((User)request.getSession().getAttribute(Constants.USER_SESSION)).getId());
		provider.setModifyDate(new Date());
		boolean flag = false;

		flag = providerService.modify(provider);
		System.out.println("--------flag="+flag);
		if(flag){
			return "redirect:/provider.do?method=query";
//			response.sendRedirect(request.getContextPath()+"/jsp/provider.do?method=query");
		}else{
			return "providermodify";
//			request.getRequestDispatcher("providermodify.jsp").forward(request, response);
		}

	}

	private String getProviderById(HttpServletRequest request, HttpServletResponse response, String url)
			throws ServletException, IOException {

		String id = request.getParameter("proid");
		System.out.println("-------------"+id);
		if(!StringUtils.isNullOrEmpty(id)){

			Provider provider = null;
			provider = providerService.getProviderById(id);
			//页面跳转(frame.jsp)
			return "frame";
		}else{
			//页面跳转(login.jsp)带出提示信息--转发
			model.addAttribute("error", "用户名或密码不正确");
			return "login";
			//.forward(request, response);
		}
	}

}

public class SysFilter implements Filter {

	@Override
	public void init(FilterConfig filterConfig) throws ServletException {
		// TODO Auto-generated method stub
//		System.out.println("TestFilter init()===========");

	}

	@Override
	public void doFilter(ServletRequest request, ServletResponse response,
                         FilterChain chain) throws IOException, ServletException {
		// TODO Auto-generated method stub
		System.out.println("SysFilter doFilter()===========");
		HttpServletRequest rq = (HttpServletRequest)request;
		HttpServletResponse rp = (HttpServletResponse)response;
		User userSession = (User)rq.getSession().getAttribute("userSession");
		if(null == userSession){
			rp.sendRedirect("/SMBMS/error.jsp");
		}else{
			chain.doFilter(request, response);
		}
	@RequestMapping(value="/bill.do",method = {RequestMethod.POST, RequestMethod.GET})
	public String doPost(HttpServletRequest request, HttpServletResponse response, @RequestParam(value="method",required = false) String method)
			throws ServletException, IOException {
		System.out.println("=================== "+method);
		if(method != null && method.equals("query")){
			return this.query(request,response);
		}else if(method != null && method.equals("add")){
			return  this.add(request,response);
		}else if(method != null && method.equals("view")){
			return  this.getBillById(request,response,"billview");
		}else if(method != null && method.equals("modify")){
			return this.getBillById(request,response,"billmodify");
		}else if(method != null && method.equals("modifysave")){
			return this.modify(request,response);
		}else if(method != null && method.equals("delbill")){
			this.delBill(request,response);
		}else if(method != null && method.equals("getproviderlist")){
			this.getProviderlist(request,response);
		}
		return "error";
	}

	private void getProviderlist(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		System.out.println("getproviderlist ========================= ");
		List<Provider> providerList = new ArrayList<Provider>();
		providerList = providerService.getProviderList("","");
		System.out.println("getProName--------------"+providerList.get(0).getProName());
		//把providerList转换成json对象输出
				//		response.setContentType("application/json");
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		PrintWriter outPrintWriter = response.getWriter();
		outPrintWriter.write(JSONArray.toJSONString(providerList));
		outPrintWriter.flush();
		outPrintWriter.close();
	}
	private String getBillById(HttpServletRequest request, HttpServletResponse response, String url)
			throws ServletException, IOException {
		String id = request.getParameter("billid");
		if(!StringUtils.isNullOrEmpty(id)){

			Bill bill = null;
			bill = billService.getBillById(id);
			System.out.println("bill================>  "+bill);
			request.setAttribute("bill", bill);
			return url;
//			request.getRequestDispatcher(url).forward(request, response);
		}
		String proContact = request.getParameter("proContact");
		String proPhone = request.getParameter("proPhone");
		String proAddress = request.getParameter("proAddress");
		String proFax = request.getParameter("proFax");
		String proDesc = request.getParameter("proDesc");
		String id = request.getParameter("id");
		Provider provider = new Provider();
		provider.setId(Integer.valueOf(id));
		provider.setProContact(proContact);
		provider.setProPhone(proPhone);
		provider.setProFax(proFax);
		provider.setProAddress(proAddress);
		provider.setProDesc(proDesc);
		provider.setModifyBy(((User)request.getSession().getAttribute(Constants.USER_SESSION)).getId());
		provider.setModifyDate(new Date());
		boolean flag = false;

		flag = providerService.modify(provider);
		System.out.println("--------flag="+flag);
		if(flag){
			return "redirect:/provider.do?method=query";
//			response.sendRedirect(request.getContextPath()+"/jsp/provider.do?method=query");
		}else{
			return "providermodify";
//			request.getRequestDispatcher("providermodify.jsp").forward(request, response);
		}

	}

	private String getProviderById(HttpServletRequest request, HttpServletResponse response, String url)
			throws ServletException, IOException {

		String id = request.getParameter("proid");
		System.out.println("-------------"+id);
		if(!StringUtils.isNullOrEmpty(id)){

			Provider provider = null;
			provider = providerService.getProviderById(id);
			request.setAttribute("provider", provider);
			System.out.println("-------------"+id);
			return url;
//			request.getRequestDispatcher(url).forward(request, response);
		}
		return "error";

@Controller
public class UserServlet{
	@Autowired
	BillServiceImpl billService;
	@Autowired
	ProviderServiceImpl providerService;
	@Autowired
	UserServiceImpl userService;
	@Autowired
	RoleServiceImpl roleService;
	@RequestMapping(value="/user.do",method = {RequestMethod.POST, RequestMethod.GET})
	public String doPost(HttpSession session, @Valid User user, BindingResult bindingResult, HttpServletRequest request, HttpServletResponse response, @RequestParam(value="method",required = false) String method, Model model)
			throws ServletException, IOException {
		System.out.println("--------------->"+method);
		}else{
			resultMap.put("delResult", "notexit");
		}
		//把resultMap转换成json对象输出
				//		response.setContentType("application/json");
		request.setCharacterEncoding("utf-8");
		response.setContentType("text/html;charset=utf-8");
		PrintWriter outPrintWriter = response.getWriter();
		outPrintWriter.write(JSONArray.toJSONString(resultMap));
		outPrintWriter.flush();
		outPrintWriter.close();
	}
	private String add(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String billCode = request.getParameter("billCode");
		String productName = request.getParameter("productName");
		String productDesc = request.getParameter("productDesc");
		String productUnit = request.getParameter("productUnit");

		String productCount = request.getParameter("productCount");
		String totalPrice = request.getParameter("totalPrice");
		String providerId = request.getParameter("providerId");
		String isPayment = request.getParameter("isPayment");

		Bill bill = new Bill();
		bill.setBillCode(billCode);
		bill.setProductName(productName);
		bill.setProductDesc(productDesc);
		bill.setProductUnit(productUnit);
		bill.setProductCount(new BigDecimal(productCount).setScale(2,BigDecimal.ROUND_DOWN));
		bill.setIsPayment(Integer.parseInt(isPayment));
		bill.setTotalPrice(new BigDecimal(totalPrice).setScale(2,BigDecimal.ROUND_DOWN));
		bill.setProviderId(Integer.parseInt(providerId));
		bill.setCreatedBy(((User)request.getSession().getAttribute(Constants.USER_SESSION)).getId());
		bill.setCreationDate(new Date());
		boolean flag = false;

		flag = billService.add(bill);
		System.out.println("add flag -- > " + flag);
		if(flag){
			return "redirect:/bill.do?method=query";
//			response.sendRedirect(request.getContextPath()+"/jsp/bill.do?method=query");
		}else{
		List<Role> roleList = null;
		System.out.println(userList.get(0).getRole().getRoleName());
		roleList = roleService.getRoleList();
		System.out.println("=====  "+roleList.get(0).getRoleCode()+"--------roleList:"+roleList.get(0).getRoleName());
		request.setAttribute("roleList", roleList);
		request.setAttribute("queryUserName", queryUserName);
		request.setAttribute("queryUserRole", queryUserRole);
		request.setAttribute("totalPageCount", totalPageCount);
		request.setAttribute("totalCount", totalCount);
		request.setAttribute("currentPageNo", currentPageNo);
		return "userlist";
	}

	private String add(HttpServletRequest request, HttpServletResponse response, User user, BindingResult bindingResult, HttpSession session)
			throws ServletException, IOException {
		if(bindingResult.hasErrors()){
			System.out.println("输入错误");
			return "useradd";
		}System.out.println("111");
		user.setCreatedBy(((User)session.getAttribute(Constants.USER_SESSION)).getId());System.out.println("222");
		user.setCreationDate(new Date());System.out.println("333");
		if(userService.add(user)){return "redirect:/user.do?method=query";}System.out.println("444");
		return "useradd";
	}
}

		return "providerlist";
//		request.getRequestDispatcher("providerlist.jsp").forward(request, response);
	}

}

@Controller
public class Page_jump {
    //表示方法与请求URL的映射,这里映射/index请求
    @RequestMapping(value="/billadd",method = {RequestMethod.POST, RequestMethod.GET})
    public String billadd(){
        return "billadd";
    }
    @RequestMapping(value="/pwdmodify",method = {RequestMethod.POST, RequestMethod.GET})
    public String pwdmodify(){
        return "pwdmodify";
    }
    @RequestMapping(value="/provideradd",method = {RequestMethod.POST, RequestMethod.GET})
    public String provideradd(){
        return "provideradd";
    }
    @RequestMapping(value="/useradd",method = {RequestMethod.POST, RequestMethod.GET})
    public String useradd(Model model){
        model.addAttribute("user", new User());//这里给视图层提供了数据的对象,用来数据绑定
        return "useradd";
    }
    /*@RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){
        return "pwdmodify";
    }
    @RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){
        return "pwdmodify";
    }
    @RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){
        return "pwdmodify";
    }
    @RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){

@Controller
public class ProviderServlet {
	@Autowired
	BillServiceImpl billService;
	@Autowired
	ProviderServiceImpl providerService;
	@Autowired
	UserServiceImpl userService;

	@RequestMapping(value="/provider.do",method = {RequestMethod.POST, RequestMethod.GET})
	public String doPost(HttpServletRequest request, HttpServletResponse response, @RequestParam(value="method",required = false) String method)
			throws ServletException, IOException {
		if(method != null && method.equals("query")){
			return this.query(request,response);
		}else if(method != null && method.equals("add")){
			return this.add(request,response);
		}else if(method != null && method.equals("view")){
			return this.getProviderById(request,response,"providerview");
		}else if(method != null && method.equals("modify")){
			return this.getProviderById(request,response,"providermodify");
		}else if(method != null && method.equals("modifysave")){
			return this.modify(request,response);
		}else if(method != null && method.equals("delprovider")){
			 this.delProvider(request,response);
		}
		return "error";
	}

	private void delProvider(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

@Controller

public class LogoutServlet{
	@Autowired
	UserServiceImpl userService;
	@Autowired
	RoleServiceImpl roleService;
	@Autowired
	ProviderServiceImpl providerService;
	@Autowired
	BillServiceImpl billService;
	@RequestMapping(value="/logout.do",method = {RequestMethod.POST, RequestMethod.GET})
	public String  doPost(HttpServletRequest request, HttpServletResponse response)
			{
		//清除session
		request.getSession().removeAttribute(Constants.USER_SESSION);
		return "/login";
	}

}

public class CharacterEncoding implements Filter {

@Controller
public class ProviderServlet {
	@Autowired
	BillServiceImpl billService;
	@Autowired
	ProviderServiceImpl providerService;
	@Autowired
	UserServiceImpl userService;

	@RequestMapping(value="/provider.do",method = {RequestMethod.POST, RequestMethod.GET})
	public String doPost(HttpServletRequest request, HttpServletResponse response, @RequestParam(value="method",required = false) String method)
			throws ServletException, IOException {
		if(method != null && method.equals("query")){
			return this.query(request,response);
		}else if(method != null && method.equals("add")){
			return this.add(request,response);
		}else if(method != null && method.equals("view")){
			return this.getProviderById(request,response,"providerview");
		}else if(method != null && method.equals("modify")){
			return this.getProviderById(request,response,"providermodify");
		}else if(method != null && method.equals("modifysave")){
			return this.modify(request,response);
		}else if(method != null && method.equals("delprovider")){
			 this.delProvider(request,response);
		}
		return "error";
	}

	private void delProvider(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id = request.getParameter("proid");
		String proName = request.getParameter("proName");
		String proContact = request.getParameter("proContact");
		String proPhone = request.getParameter("proPhone");
		String proAddress = request.getParameter("proAddress");
		String proFax = request.getParameter("proFax");
		String proDesc = request.getParameter("proDesc");

		Provider provider = new Provider();
		provider.setProCode(proCode);
		provider.setProName(proName);
		provider.setProContact(proContact);
		provider.setProPhone(proPhone);
		provider.setProFax(proFax);
		provider.setProAddress(proAddress);
		provider.setProDesc(proDesc);
		provider.setCreatedBy(((User)request.getSession().getAttribute(Constants.USER_SESSION)).getId());
		provider.setCreationDate(new Date());
		boolean flag = false;

		flag = providerService.add(provider);
		if(flag){
			return "redirect:/provider.do?method=query";
//			response.sendRedirect(request.getContextPath()+"/jsp/provider.do?method=query");
		}else{
			return "provideradd";
//			request.getRequestDispatcher("provideradd.jsp").forward(request, response);
		}
	}

	private String query(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String queryProName = request.getParameter("queryProName");
		String queryProCode = request.getParameter("queryProCode");
		if(StringUtils.isNullOrEmpty(queryProName)){
			queryProName = "";
		}
		if(StringUtils.isNullOrEmpty(queryProCode)){
			queryProCode = "";
		}
		List<Provider> providerList = new ArrayList<Provider>();
		providerList = providerService.getProviderList(queryProName,queryProCode);
		request.setAttribute("providerList", providerList);
		request.setAttribute("queryProName", queryProName);
		request.setAttribute("queryProCode", queryProCode);
		return "providerlist";

@Controller
public class UserServlet{
	@Autowired
	BillServiceImpl billService;
	@Autowired
	ProviderServiceImpl providerService;
	@Autowired
	UserServiceImpl userService;
	@Autowired
	RoleServiceImpl roleService;
	@RequestMapping(value="/user.do",method = {RequestMethod.POST, RequestMethod.GET})
	public String doPost(HttpSession session, @Valid User user, BindingResult bindingResult, HttpServletRequest request, HttpServletResponse response, @RequestParam(value="method",required = false) String method, Model model)
			throws ServletException, IOException {
		System.out.println("--------------->"+method);
		if(method != null && method.equals("add")){
			return this.add(request, response,user,bindingResult,session);
		}else if(method != null && method.equals("query")){
			return this.query(request, response);
		}else if(method != null && method.equals("getrolelist")){
			this.getRoleList(request, response);
		}else if(method != null && method.equals("ucexist")){
			this.userCodeExist(request, response);
		}else if(method != null && method.equals("deluser")){
			this.delUser(request, response);
		}else if(method != null && method.equals("view")){
			return this.getUserById(request, response,"userview",model);
		}else if(method != null && method.equals("modify")){
			return this.getUserById(request, response,"usermodify",model);
		}else if(method != null && method.equals("modifyexe")){
			return this.modify(request, response);
		}else if(method != null && method.equals("pwdmodify")){
			this.getPwdByUserId(request, response);
		}else if(method != null && method.equals("savepwd")){
			return this.updatePwd(request, response);
		}
		return "error";

	}
	private String updatePwd(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		Object o = request.getSession().getAttribute(Constants.USER_SESSION);
		String newpassword = request.getParameter("newpassword");
		boolean flag = false;
		if(o != null && !StringUtils.isNullOrEmpty(newpassword)){
			flag = userService.updatePwd(((User)o).getId(),newpassword);
			if(flag){
				request.setAttribute(Constants.SYS_MESSAGE, "修改密码成功,请退出并使用新密码重新登录!");
				request.getSession().removeAttribute(Constants.USER_SESSION);//session注销
			}else{
				request.setAttribute(Constants.SYS_MESSAGE, "修改密码失败!");
			}
	private String getUserById(HttpServletRequest request, HttpServletResponse response, String url, Model model)
			throws ServletException, IOException {
		String id = request.getParameter("uid");

		if(!StringUtils.isNullOrEmpty(id)){
			//调用后台方法得到user对象

			User user = userService.getUserById(id);
			System.out.println("------------> "+user);
			model.addAttribute("user", user);
			return url;
//			request.getRequestDispatcher(url).forward(request, response);
		}
		return "error";
	}
	private void delUser(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String id = request.getParameter("uid");
		Integer delId = 0;
		try{
			delId = Integer.parseInt(id);
		}catch (Exception e) {
			// TODO: handle exception
			delId = 0;
		}
		HashMap<String, String> resultMap = new HashMap<String, String>();
		if(delId <= 0){
			resultMap.put("delResult", "notexist");
		}else{

			if(userService.deleteUserById(delId)){
				resultMap.put("delResult", "true");
			}else{
				resultMap.put("delResult", "false");
			}
		}

		//把resultMap转换成json对象输出
				//		response.setContentType("application/json");
		request.setCharacterEncoding("utf-8");
		}else{
			return "billadd";
//			request.getRequestDispatcher("billadd.jsp").forward(request, response);
		}

	}
	private String query(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		System.out.println("=======================");
		List<Provider> providerList = new ArrayList<Provider>();
		providerList = providerService.getProviderList("","");
		request.setAttribute("providerList", providerList);
		String queryProductName = request.getParameter("queryProductName");
		String queryProviderId = request.getParameter("queryProviderId");
		String queryIsPayment = request.getParameter("queryIsPayment");
		if(StringUtils.isNullOrEmpty(queryProductName)){
			queryProductName = "";
		}

		List<Bill> billList = new ArrayList<Bill>();
		Bill bill = new Bill();
		if(StringUtils.isNullOrEmpty(queryIsPayment)){
			bill.setIsPayment(0);
		}else{
			bill.setIsPayment(Integer.parseInt(queryIsPayment));
		}

		if(StringUtils.isNullOrEmpty(queryProviderId)){
			bill.setProviderId(0);
		}else{
			bill.setProviderId(Integer.parseInt(queryProviderId));
		}
		bill.setProductName(queryProductName);
		billList = billService.getBillList(bill);
        System.out.println("=------------------"+billList);
		request.setAttribute("billList", billList);
		request.setAttribute("queryProductName", queryProductName);
		request.setAttribute("queryProviderId", queryProviderId);
		request.setAttribute("queryIsPayment", queryIsPayment);
		return "billlist";
//		request.getRequestDispatcher("billlist.jsp").forward(request, response);

	}

	public static void main(String[] args) {
		System.out.println(new BigDecimal("23.235").setScale(2,BigDecimal.ROUND_HALF_DOWN));
	}
}
		System.out.println("add flag -- > " + flag);
		if(flag){
			return "redirect:/bill.do?method=query";
//			response.sendRedirect(request.getContextPath()+"/jsp/bill.do?method=query");
		}else{
			return "billadd";
//			request.getRequestDispatcher("billadd.jsp").forward(request, response);
		}

	}
	private String query(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		System.out.println("=======================");
		List<Provider> providerList = new ArrayList<Provider>();
		providerList = providerService.getProviderList("","");
		request.setAttribute("providerList", providerList);
		String queryProductName = request.getParameter("queryProductName");
		String queryProviderId = request.getParameter("queryProviderId");
		String queryIsPayment = request.getParameter("queryIsPayment");
		if(StringUtils.isNullOrEmpty(queryProductName)){
			queryProductName = "";
		}

		List<Bill> billList = new ArrayList<Bill>();
		Bill bill = new Bill();
		if(StringUtils.isNullOrEmpty(queryIsPayment)){
			bill.setIsPayment(0);
		}else{
			bill.setIsPayment(Integer.parseInt(queryIsPayment));
		}

		if(StringUtils.isNullOrEmpty(queryProviderId)){
			bill.setProviderId(0);
		}else{
			bill.setProviderId(Integer.parseInt(queryProviderId));
		}
		bill.setProductName(queryProductName);
		billList = billService.getBillList(bill);
        System.out.println("=------------------"+billList);
		request.setAttribute("billList", billList);
		request.setAttribute("queryProductName", queryProductName);
		request.setAttribute("queryProviderId", queryProviderId);
	}

	private String query(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		String queryProName = request.getParameter("queryProName");
		String queryProCode = request.getParameter("queryProCode");
		if(StringUtils.isNullOrEmpty(queryProName)){
			queryProName = "";
		}
		if(StringUtils.isNullOrEmpty(queryProCode)){
			queryProCode = "";
		}
		List<Provider> providerList = new ArrayList<Provider>();
		providerList = providerService.getProviderList(queryProName,queryProCode);
		request.setAttribute("providerList", providerList);
		request.setAttribute("queryProName", queryProName);
		request.setAttribute("queryProCode", queryProCode);
		return "providerlist";
//		request.getRequestDispatcher("providerlist.jsp").forward(request, response);
	}

}

@Controller
public class Page_jump {
    //表示方法与请求URL的映射,这里映射/index请求
    @RequestMapping(value="/billadd",method = {RequestMethod.POST, RequestMethod.GET})
    public String billadd(){
        return "billadd";
    }
    @RequestMapping(value="/pwdmodify",method = {RequestMethod.POST, RequestMethod.GET})
    public String pwdmodify(){
        return "pwdmodify";
    }
    @RequestMapping(value="/provideradd",method = {RequestMethod.POST, RequestMethod.GET})
    public String provideradd(){
        return "provideradd";
    }
    @RequestMapping(value="/useradd",method = {RequestMethod.POST, RequestMethod.GET})
    public String useradd(Model model){
        model.addAttribute("user", new User());//这里给视图层提供了数据的对象,用来数据绑定
        return "useradd";
    }
    /*@RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})

}

@Controller
public class Page_jump {
    //表示方法与请求URL的映射,这里映射/index请求
    @RequestMapping(value="/billadd",method = {RequestMethod.POST, RequestMethod.GET})
    public String billadd(){
        return "billadd";
    }
    @RequestMapping(value="/pwdmodify",method = {RequestMethod.POST, RequestMethod.GET})
    public String pwdmodify(){
        return "pwdmodify";
    }
    @RequestMapping(value="/provideradd",method = {RequestMethod.POST, RequestMethod.GET})
    public String provideradd(){
        return "provideradd";
    }
    @RequestMapping(value="/useradd",method = {RequestMethod.POST, RequestMethod.GET})
    public String useradd(Model model){
        model.addAttribute("user", new User());//这里给视图层提供了数据的对象,用来数据绑定
        return "useradd";
    }
    /*@RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){
        return "pwdmodify";
    }
    @RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){
        return "pwdmodify";
    }
    @RequestMapping(value="/pwdmodify.do",method = {RequestMethod.POST,RequestMethod.GET})
    public String index(){

请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述
请添加图片描述

  • 0
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值