org.axonframework.spring.stereotype.Aggregate类的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(3.0k)|赞(0)|评价(0)|浏览(174)

本文整理了Java中org.axonframework.spring.stereotype.Aggregate类的一些代码示例,展示了Aggregate类的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Aggregate类的具体详情如下:
包路径:org.axonframework.spring.stereotype.Aggregate
类名称:Aggregate

Aggregate介绍

暂无

代码示例

代码示例来源:origin: AxonFramework/AxonFramework

Class<A> aggregateType = (Class<A>) beanFactory.getType(aggregate);
AggregateConfigurer<A> aggregateConf = AggregateConfigurer.defaultConfiguration(aggregateType);
if ("".equals(aggregateAnnotation.repository())) {
  String repositoryName = lcFirst(aggregateType.getSimpleName()) + "Repository";
  String factoryName =
    String triggerDefinition = aggregateAnnotation.snapshotTriggerDefinition();
    if (!"".equals(triggerDefinition)) {
      aggregateConf.configureSnapshotTrigger(
      c -> beanFactory.getBean(aggregateAnnotation.repository(), Repository.class));
if (!"".equals(aggregateAnnotation.commandTargetResolver())) {
  aggregateConf.configureCommandTargetResolver(c -> getBean(aggregateAnnotation.commandTargetResolver(),
                               c));
} else {

代码示例来源:origin: AxonFramework/Axon-trader

@Aggregate
public class Company {

  @AggregateIdentifier
  private CompanyId companyId;

  @SuppressWarnings("UnusedDeclaration")
  public Company() {
    // Required by Axon Framework
  }

  @CommandHandler
  public Company(CreateCompanyCommand cmd) {
    apply(new CompanyCreatedEvent(
        cmd.getCompanyId(), cmd.getCompanyName(), cmd.getCompanyValue(), cmd.getAmountOfShares()
    ));
  }

  @CommandHandler
  public void handle(AddOrderBookToCompanyCommand cmd) {
    apply(new OrderBookAddedToCompanyEvent(companyId, cmd.getOrderBookId()));
  }

  @EventSourcingHandler
  public void on(CompanyCreatedEvent event) {
    companyId = event.getCompanyId();
  }
}

代码示例来源:origin: AxonFramework/Axon-trader

@Aggregate
public class User {

代码示例来源:origin: pivotalsoftware/ESarch

@Aggregate
public class Company {

代码示例来源:origin: holisticon/axon-kafka

@Aggregate
public class Notification {

代码示例来源:origin: AxonIQ/axon-quick-start

@Aggregate
public class ChatRoom {

代码示例来源:origin: EdisonXu/sbs-axon

@Aggregate
public class BankAccount {

代码示例来源:origin: pivotalsoftware/ESarch

@Aggregate
public class User {

代码示例来源:origin: AxonIQ/giftcard-demo

@Aggregate
@Profile("command")
public class GiftCard {

代码示例来源:origin: AxonFramework/AxonBank

@Aggregate
public class BankTransfer {

代码示例来源:origin: AxonFramework/AxonBank

@Aggregate
public class BankAccount {

代码示例来源:origin: EdisonXu/sbs-axon

@Aggregate(repository = "accountRepository")
@Entity
public class BankAccount {

代码示例来源:origin: avthart/spring-boot-axon-sample

@Aggregate
public class Task {

代码示例来源:origin: AxonFramework/Axon-trader

@Aggregate
public class Transaction {

代码示例来源:origin: pivotalsoftware/ESarch

@Aggregate
public class Transaction {

代码示例来源:origin: AxonFramework/Axon-trader

@Aggregate
public class Portfolio {

代码示例来源:origin: pivotalsoftware/ESarch

@Aggregate
public class Portfolio {

代码示例来源:origin: vvgomes/event-driven-restaurant

@Aggregate
@FieldDefaults(level = PRIVATE)
public class MenuItem {

代码示例来源:origin: vvgomes/event-driven-restaurant

@Aggregate
@FieldDefaults(level = PRIVATE)
public class Customer {

代码示例来源:origin: vvgomes/event-driven-restaurant

@Aggregate
@FieldDefaults(level = PRIVATE)
public class Order {

相关文章