package com.lin.register.action;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.common.util.MD5Util;
import com.lin.common.dao.Lz002001Dao;
import com.lin.common.entity.Lz002001;
@Component
public class RegisterAction {
@Autowired
private Lz002001Dao lz002001Dao;
public String toRegister(){
return "toRegister";
}
public String register(){
Lz002001 lz002001=new Lz002001();
lz002001.setUname(uname);
lz002001.setUpass(MD5Util.toMD5(upass));
lz002001Dao.save(lz002001);
return "register";
}
private String uname;
public String getUname() {
return uname;
}
public void setUname(String uname) {
this.uname = uname;
}
public String getUpass() {
return upass;
}
public void setUpass(String upass) {
this.upass = upass;
}
private String upass;
}