java javers anyDomainObject方法给出了一个异常
我被javersanyDomainObject方法卡住了,它给出了一个例外
事实上,如果instanceid方法使用我,javers给出了一个合适的数据
例如:
Changes changes = javers.findChanges(
QueryBuilder.byInstanceId("1", LoyaltyProgramSetting.class)
.from(date1.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())
.to(new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())
.withNewObjectChanges(true).build());
例如,当我使用anyDomainObject方法时,上述方法成功执行 **
Calendar cal1 = Calendar.getInstance();
cal1.set(Calendar.HOUR_OF_DAY, 13);
cal1.set(Calendar.MINUTE, 45);
Date date1 = cal1.getTime();
Changes changes1 = javers.findChanges(
QueryBuilder.anyDomainObject().from(
date1.toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())
.to(new Date().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime())
.withNewObjectChanges(true).build())
**
所以上面的这个方法抛出了一个异常。
例外情况如下:
可丢弃的java。朗。反思。调用targetException。getTargetException()
我也在努力
Changes changes = javers.findChanges( QueryBuilder.anyDomainObject().build());
但和它一样,抛出一个异常
如果有任何帮助,请提前感谢
共 (0) 个答案