使用axon框架我有一个错误:
应用事件后,聚合标识符必须是非空的。确保在处理创建事件时最迟初始化了聚合标识符。我使用这个StorageEngine:
@Bean
public JdbcEventStorageEngine jdbcEventStorageEngine() throws Exception{
return new JdbcEventStorageEngine(dataSource::getConnection, NoTransactionManager.INSTANCE);
}
@CommandHandler
public void handle(CreateProductCommand command) throws Exception {
Aggregate<Product> productAggregate = null;
try {
productAggregate = repository.load(command.getId());
} catch (AggregateNotFoundException exception) {
logger.info("Aggregate with " + command.getId() + " is not found. Creating new one...");
productAggregate = repository.newInstance(() -> new Product(command.getId()));
}
productAggregate.execute(product -> product.createProduct(command.getId()));
}
@Bean
public EventStorageEngine eventStorageEngine() {
return new InMemoryEventStorageEngine();
}
移除spring devtools很好地解决了问题。
我尝试用Axon配置cqrs和事件源。SeatReseveCreateCommand工作正常。但是SeatReserveUpadateCommand工作不正确。 这是我的SeatReserve集合 这是我的控制器 更新导致此错误 我怎么解决这个。
中的任何提示都非常感谢,谢谢。
我已经升级到Xcode 7,突然我的一个目标无法使用“宏名称必须是标识符”消息构建。此目标的调试配置构建正常,我可以在设备上运行它,但发布配置不会构建。 错误指向目标的.pch文件,但对于许多其他目标(包括已发布的目标),相同的.pch文件构建正常。 以下是错误消息: 这是。pch文件: 我已经尝试过清理和Xcode重启。 我将非常感谢任何关于如何深入挖掘并找到问题所在的建议。
如何读取自创建以来该聚合的所有事件?
我正在使用SODA for Java存储和检索Oracle12c DB中的文档。我正在效仿这个例子。 这一例外背后的原因将是什么?