@TableName(autoResultMap = true)
public class BlogUser implements Serializable {
private static final long serialVersionUID = 1L;
private Long id;
private String name;
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
private Integer version;
/**
* 几种不同的json解析工具jar
* 非object对象必须在实体里面加上 @TableName(autoResultMap = true),否则查询不出数据
*/
@TableField(typeHandler = JacksonTypeHandler.class)
@TableField(typeHandler = FastjsonTypeHandler.class)
private Relation relation;
还有一种就是直接在xml里面写,直接引用,效果是一样的