kotlin data class + bean validation jsr 303
问题 I'm trying to get Kotlin working with jsr 303 validation on a spring-data-rest project. Given the following data class declarartion : @Entity data class User( @Id @GeneratedValue(strategy = javax.persistence.GenerationType.AUTO) var id: Long? = null, @Size(min=5, max=15) val name: String ) The @Size annotation has no effect here, making me able to save a user with a name of 1 character. It works well when executing the very same example but in a Java class instead of Kotlin. This makes me