package com.zyf.d_type;
import java.util.Date;
public class User {
//封装请求数据
private String name; //必须给set、get可以不用给
private String pwd;
private int age;
private Date birth;
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getPwd() {
return pwd;
}
public void setPwd(String pwd) {
this.pwd = pwd;
}
public int getAge() {
return age;
}
public void setAge(int age) {
this.age = age;
}
public Date getBirth() {
return birth;
}
public void setBirth(Date birth) {
this.birth = birth;
}
}
package com.zyf.d_type;
public class UserAction {
private User user ;
public void setUser(User user) {
this.user = user;
}
public User getUser() {
return user;
}
public String register() {
// TODO Auto-generated method stub
System.out.println(user.getName());
System.out.println(user.getPwd());
System.out.println(user.getAge());
System.out.println(user.getBirth());
return "success";
}
}