问答详情
源自:4-3 商品模型模型--商品创建03

HV000030: No validator could be found for constraint 'javax.validation.constraints.NotBlank' validating type 'java.lang.String'. Check configuration for 'description'

HV000030: No validator could be found for constraint 'javax.validation.constraints.NotBlank' validating type 'java.lang.String'. Check configuration for 'description'

提问者:卷神一代 2022-03-22 15:13

个回答

  • 卷神一代
    2022-03-22 15:14:31

    import org.hibernate.validator.constraints.NotBlank;
    
    import javax.validation.constraints.Min;
    import javax.validation.constraints.NotNull;
    NotBlank注解不要使用javax.validation.constraints,否则会报错这个错误!
    使用org.hibernate.validator.constraints.NotBlank,这个包下的