英文:
IntelliJ does't have @NotBlank
问题
以下是翻译好的内容:
所以我正在运行我的程序,我需要从import javaz.validation.constraints.NotBlank;
设置@NotNull
。所有内容如下:
@NonNull
private final String firstName;
和import org.springframework.lang.NonNull;
我应该如何安装 @NotNull,还是 @NonNull 是相同的东西?
英文:
So im running my program and I need to setup @NotNull
from import javaz.validation.constraints.NotBlank;
All there is
@NonNull
private final String firstName;
and import org.springframework.lang.NonNull;
How do I install @NotNull or is @NonNull the same thing?
答案1
得分: 0
这个链接应该能回答你的问题。
简短回答:有微小的区别,但这取决于你想要什么,所以你需要阅读我上面链接的帖子,或者告诉我们更多信息。
英文:
This should answer your question.
Short answer: there is a subtle difference, but it all depends on what you want, so you either need to read the post I've linked above or tell us more information.
专注分享java语言的经验与见解,让所有开发者获益!
评论