首页>代码>SSH+JSP+MYSQL(spring4.2.4+struts2.3.24+hibernate4.1.7)用户登录以及简单增删查改的网站实例>/ssh_demo/src/com/action/AddAction.java
package com.action; import com.entity.Custom; import com.opensymphony.xwork2.ActionSupport; import com.service.CustomService; public class AddAction extends ActionSupport { private CustomService customService; //业务逻辑组件 //设置业务逻辑组件 private Custom newcustom; //新用户 public CustomService getCustomService() { return customService; } public void setCustomService(CustomService customService) { this.customService = customService; } public Custom getNewcustom() { return newcustom; } public void setNewcustom(Custom newcustom) { this.newcustom = newcustom; } @Override public String execute() throws Exception { Custom custom = new Custom(); custom.setName(newcustom.getName()); custom.setPassword(newcustom.getPassword()); custom.setMobile(newcustom.getMobile()); custom.setEmail(newcustom.getEmail()); customService.saveCustom(custom); return "SUCCESS"; } }
最近下载更多
星辰xc LV2
2023年5月7日
彩色天空 LV5
2023年4月8日
fengshengtian LV8
2022年2月19日
839749683 LV9
2021年12月21日
erqian LV1
2021年6月21日
1973356987 LV13
2021年6月16日
zdm_3366 LV3
2021年1月18日
lovemyhome LV5
2021年1月2日
wob_ku LV6
2020年7月4日
昵称zzz LV13
2020年7月3日