上手篇1源码上手篇1源码.zip
立即下载
资源介绍:
上手篇1源码上手篇1源码.zip
package com.gansu.pojo;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
@Configuration
@PropertySource("classpath:userBody.properties")
@ConfigurationProperties(prefix = "userbody") //prefix 参数必须全部为小写
public class UserBody implements Serializable {
private String username;
private String password;
private Integer age;
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date birthday;
public UserBody() {
}
public UserBody(String username, String password, Integer age, Date birthday) {
this.username = username;
this.password = password;
this.age = age;
this.birthday = birthday;
}
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 Integer getAge() {
return age;
}
public void setAge(Integer age) {
this.age = age;
}
public Date getBirthday() {
return birthday;
}
public void setBirthday(Date birthday) {
this.birthday = birthday;
}
@Override
public String toString() {
return "UserBody{" +
"username='" + username + '\'' +
", password='" + password + '\'' +
", age=" + age +
", birthday='" + birthday + '\'' +
'}';
}
}
资源文件列表:
上手篇1源码.zip 大约有140个文件