javax.validation.UnexpectedTypeException: HV000030: No validator could be found for constraint 'javax.validation.constraints.Pattern' validating type 'java.lang.Long'. Check configuration for 'userId'
@Schema(description = "专家对应用户编号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "用户ID不允许为空")
@Pattern(regexp = "^[0-9]*$",message = "用户编号必须为数字")
private Long userId;
解决方法:Long类型改为String类型
@Schema(description = "专家对应用户编号", requiredMode = Schema.RequiredMode.REQUIRED)
@NotEmpty(message = "用户ID不允许为空")
@Pattern(regexp = "^[0-9]*$",message = "用户编号必须为数字")
private String userId;