Annotations from javax.validation.constraints not working

后端 未结 15 1359
广开言路
广开言路 2020-11-28 06:23

What configuration is needed to use annotations from javax.validation.constraints like @Size, @NotNull, etc.? Here\'s my code:

15条回答
  •  Happy的楠姐
    2020-11-28 06:49

    You can also simply use @NonNull with the lombok library instead, at least for the @NotNull scenario. More details: https://projectlombok.org/api/lombok/NonNull.html

提交回复
热议问题