使用轴突框架我有错误后为非空: Aggregate identifier must be non-null after applying an event. Make sure the aggregate identifier is initialized at the latest when handling the creation event. I use this StorageEngin
我正在开发一个小的cqrs实现,我对它很陌生。 我想分离每个处理程序(命令和事件)从聚合和 确保所有工作正常。命令处理程序从控制器被触发 ,但从那里触发事件处理程序。 任何人请帮助。 public class User extends AbstractAnnotatedAggregateRoot<String> {
/**
*
*/
private static final long s
在Vaughn Vernon的Implementing Domain-Driven Design书中,他描述了在聚合根中使用工厂方法。一个例子是Forum聚合根,其中startDiscussion工厂方法返回Discussion聚合根。 public class Forum extends Entity {
...
public Discussion startDiscus