Does it make sense to add a serialVersionUID field to a record? I think a record might be meant to be serializable, so implementing Serializable and adding a serialVersionUID might be unnecessary, but I don't know.
public record JwtAuthenticationRequest(String username, String password) implements Serializable {
@Serial
private static final long serialVersionUID = -5867678037406733770L;
}
Is there anything special about records that I should know in the context of serialization and is it still a good practice to add serialVersionUID in records like in normal classes?
No unless you think you might change the record into a class in the future and you also don't like that the record's serialVersionUID will be 0.