Last active
October 24, 2021 21:38
-
-
Save evrentan/3a923edf32e7677d2ea9814ba3981b13 to your computer and use it in GitHub Desktop.
Declare a Class with Java Record
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.tan.myjavarecordexample.dto; | |
import org.hibernate.validator.constraints.Length; | |
import javax.validation.constraints.NotNull; | |
public record EnterpriseRecord(String id, @NotNull String name, @NotNull @Length(min = 2, max = 255) String address) { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment