package com.lk.action; import javax.annotation.Resource; import org.springframework.context.ApplicationContext; import org.springframework.context.annotation.Scope; import org.springframework.context.support.ClassPathXmlApplicationContext; import org.springframework.stereotype.Component; import com.lk.model.Student; import com.lk.model.User; import com.lk.service.UserManager; import com.lk.vo.Info; import com.opensymphony.xwork2.ActionSupport; import com.opensymphony.xwork2.ModelDriven; @Component("user") @Scope("prototype") public class UserAction extends ActionSupport implements ModelDriven{ private Info info = new Info(); private UserManager um ; public Info getInfo() { return info; } public void setInfo(Info info) { this.info = info; } public UserManager getUm() { return um; } @Resource(name="userManager") public void setUm(UserManager um) { this.um = um; } /** * 用户登录判断的action * @return success登录成功界面 fail登录失败界面 * @throws Exception */ public String login() throws Exception { User u = new User(); u.setUsername(info.getUsername()); u.setPassword(info.getPassword()); if(um.existsUserNamePwd(u)){ return "success"; } return "fail"; } public String add() throws Exception{ Student stu = new Student(); stu.setId(info.getId()); stu.setName(info.getName()); stu.setCollege(info.getCollege()); stu.setProfession(info.getProfession()); return "success"; } public Object getModel() { // TODO Auto-generated method stub return info; } }

zhangbo2020 LV6
2023年11月22日
li951753 LV2
2023年6月18日
3516569014 LV5
2023年5月7日
ppppddww LV2
2023年4月26日
and123456 LV11
2022年2月19日
jay1992 LV14
2021年12月29日
原来是黎笙呀 LV1
2021年12月21日
1798139161 LV4
2021年12月5日
lsglsg9 LV23
2021年11月28日
178174qasw LV10
2021年8月19日

1516299986 LV9
4月16日
ma406805131 LV19
2024年12月27日
571818771 LV3
2024年12月16日
abdkfksdkf LV16
2024年9月18日
卢旯旯 LV4
2024年6月10日
hai341228 LV1
2024年5月24日
LiBaQi LV2
2023年12月22日
颜菜菜 LV2
2023年12月21日
WBelong LV8
2023年12月11日
zhangbo2020 LV6
2023年11月22日