Encoders.bean(Person.class) 调用报异常
异常信息
Exception in thread "main" java.lang.UnsupportedOperationException: Cannot infer type for class personal.leo.spark.Person because it is not bean-compliant
原因: Bean的 getter,setter,不能使用 Builder 模式,否则会出现该错误
例子
正常代码
public class Person implements Serializable<