首页>代码>简单的ssh实现的注册登录增删改查图书管理系统>/ssh实现的注册登录增删改查图书管理系统/SSHBookManage/src/book/com/cn/action/AddUserAction.java
package book.com.cn.action; import book.com.cn.bean.User; import book.com.cn.service.UserService; import com.opensymphony.xwork2.ActionSupport; import java.util.Date; import javax.swing.JOptionPane; import org.springframework.context.ApplicationContext; import org.springframework.context.support.ClassPathXmlApplicationContext; public class AddUserAction extends ActionSupport { private String username, password; private int id; private UserService userService; // 业务逻辑处理组件,用接口定义,不用类定义 public void setUserService(UserService userService) { this.userService = userService; } public int getId() { return id; } public void setId(int id) { this.id = id; } public String getUsername() { return username; } public void setUsername(String username) { this.username = username; } public String getPassword() { return password; } public void setPassword(String password) { this.password = password; } public String execute() throws Exception { User user = new User(); user.setId(id); user.setUsername(username); user.setPassword(password); if (userService.addUser(user)) return SUCCESS; else return ERROR; } }
最近下载更多
managment LV3
4月17日
qwe6002 LV9
1月11日
1waxzsq212345 LV2
2023年11月22日
去码头整点薯条 LV3
2023年11月15日
syhsyhzxhzxh LV3
2023年10月23日
wspcyhy LV1
2023年9月26日
fchoo1 LV1
2023年7月6日
yemmmm666 LV1
2023年6月12日
wxy1995 LV2
2023年5月11日
3516569014 LV5
2023年5月7日
最近浏览更多
managment LV3
4月17日
1437047954
3月7日
暂无贡献等级
jhyan127
2月18日
暂无贡献等级
jiyun2021 LV9
1月24日
duoduo1234 LV2
1月16日
qwe6002 LV9
1月11日
minjiang110 LV3
1月3日
bssheep LV1
1月1日
周青松 LV3
2023年12月7日
1waxzsq212345 LV2
2023年11月22日