You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
test1/pojo/Admins.java

27 lines
792 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

package club.pojo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@Data
public class Admins {
private Integer id;
private String adminName;
private String adminPwd;
private String realName;
private String telephone;
private String email;
//主要是后台到前台的时间格式的转换
//@JsonFormat注解可以在属性的上方同样可以在属性对应的get方法上两种方式没有区别
@JsonFormat(pattern = "yyyy-MM-dd")
//主要是前后到后台的时间格式的转换
@DateTimeFormat(pattern = "yyyy-MM-dd")
private Date birthday;
private String sex;
private String pic;
private String remark;
}