Reputation: 293
I have included @SuperBuilder for super class and all subclasses:
@NoArgsConstructor
@AllArgsConstructor
@Data
@SuperBuilder
public abstract class Aggregator {
private MyEnum myEnum;
private MyPackage pck;
private String device;
}
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
@EqualsAndHashCode(callSuper = true, onlyExplicitlyIncluded = true)
public class KNAggregator extends Aggregator {
@EqualsAndHashCode.Include
private String os;
@EqualsAndHashCode.Include
private long vulnId;
private Severity severity;
}
This code throws error:
error: cannot find symbol @SuperBuilder symbol: class AggregatorBuilder location: class Aggregator
What went wrong here?
Upvotes: 1
Views: 767
Reputation: 91
You have to add @SuperBuilder(toBuilder = true) to the base class.
Assure, that you have lombok.experimental.flagUsage=allow
in the lombok.config file in the service folder.
Lombok has issues with spring boot 3/ Java 17, works well with Java 11. So, I would check that too.
Upvotes: 1