@NotBlank注解不起作用

No validator could be found for constraint ‘javax.validation.constraints.NotBlank’ validating type ‘java.lang.String’. Check configuration for ‘oldPassword’"

添加以下两个依赖,缺一不可

	
		javax.validation
		validation-api
		2.0.1.Final
	
	
		org.hibernate
		hibernate-validator
		6.0.13.Final
	

你可能感兴趣的:(后端)