Difference beetwen @Aggregate and @AggregateRoot

Hi,

maybe a stupid question, but i’m not sure to understand in which case i muse use @Aggregate or @AggregateRoot ?
Where can i found some exemple ?

Thanks for your help

Hi,

I believe @Aggregate implies you aggregate class will also be annotated with Springs @Component stereotype. Which basilly allows you to apply dependency injection on aggregate types.
@AggregateRoot has no connection with Spring whatsoever.

Benoît

@AggregateRoot allows you to specify the “type” name of an aggregate. It also acts as a stereotype, helping you to quickly recognize this class as an Aggregate Root.
@Aggregate is an Axon-Spring annotation (which is also annotated with @AggregateRoot), which causes the Axon-Spring autoconfiguration module to autoconfigure components for this Aggregate.

Cheers,

Allard