Date.class is java.sql.Date.class
但我仍然得到字段‘myList.from value’上的对象‘命令’中的错误字段错误:拒绝值2009-05-27;代码[typeMismatch.command.myList.fromDate,typeMismatch.command.myList.fromDate,typeMismatch.fromDate,typeMismatch.java.sql.Date,typeMismatch];参数typeMismat
org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375) ~[spring-batch-infrastructure(FlowJob.java:137) [spring-batch-core-4.3.6.jar:4.3.6]
at org.springframework.batch.core.job.AbstractJob.e
public class User {
@Min(value = 18, message = "Age must be greater than or equal to 18") private Integer age;
如果用户在age中输入"String Value“,我想要验证它们,并且应该提供错误消息"
at org.springframework.batch.repeat.support.RepeatTemplate.getNextResult(RepeatTemplate.java:375) ~[spring-batch-infrastructure:81) ~[spring-batch-core-4.0.1.RELEASE.jar:4.0.1.RELEASE]
at org.springframework.batch.repeat.support.RepeatTemplat
' on field 'bindings[input]': rejected value [testtock]; codes [typeMismatch.spring.cloud.stream.bindings[input],typeMismatch.spring.cloud.stream.bindings,typeMismatch.bindings[input],typeMismatch.bindings,[input],typeMismatch<
如果int字段为空,我会得到错误Field error in object 'target' on field 'custPaymentTerm': rejected value []; codes [typeMismatch.target.custPaymentTerm,typeMismatch.custPaymentTerm,typeMismatch.int,typeMismatch]; arguments [org.springframework.context.support