cn.minsin.core.annotation.NotNull Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of mutils-core Show documentation
Show all versions of mutils-core Show documentation
mutils-core 作为mutils组件中的核心模块。 可以被maven项目单独引用,引入后可提供多种帮助类,如StringUtil、NumberUtil、DateUtil等等
maven仓库:https://mvnrepository.com/artifact/cn.minsin/mutils-core
package cn.minsin.core.annotation;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
public @interface NotNull {
String value() default "Field cannot be empty";
/**
* 新增虚拟key
* 用于返回实体类的key 在0.3.4之前是用实体类的属性名作为key
* since 0.3.4
* @return
*/
String key() default "";
boolean notNull() default true;
}