Don't fork me!

Introduction

This documentation contains some help to examples from axon-examples repository. It’s contains some Axon playground projects

1. Axon Conference application

build and run app
./gradlew bootRun
# or ./mvnw spring-boot:run
# or ./gradlew build && bash build/libs/*.jar
check command model: create conference
http :8080/conference name=ololo
output:
{
    "id": "add10244-46b7-49d5-a5e9-5e2c1d8c6ce4"
}
add talk:
http :8080/conference/add10244-46b7-49d5-a5e9-5e2c1d8c6ce4 talk=ololo speaker=trololo
check query model: get speakers and conferences
http :8080/speaker
http :8080/conference
check logs
o.a.c.callbacks.LoggingCallback          : Command executed successfully: daggerok.app.CreateConferenceCommand
o.a.c.callbacks.LoggingCallback          : Command executed successfully: daggerok.app.AddTalkCommand

links:

generated by generator-jvm yeoman generator (kotlin-spring-boot)

Important part in this app is tracking processor configuration:
@Configuration
@ComponentScan(basePackageClasses = [
  Conference::class
])
class TrackingProcessorConfig {

  @Autowired
  fun enableTracking(config: EventHandlingConfiguration) {
    config.usingTrackingProcessors()
  }
}

2. JavaEE and Axon

flow
http post :8080/app/facebook/create postId=post1
http put http://localhost:8080/app/facebook/post1/like
http put http://localhost:8080/app/facebook/post1/dislike
http put http://localhost:8080/app/facebook/post1/like
http put http://localhost:8080/app/facebook/post1/like
http post :8080/app/facebook/create postId=post2
http put http://localhost:8080/app/facebook/post2/dislike
http :8080/app/posts
http :8080/app/posts/post2/events
up using docker gradle
./gradlew clean build composeUp
./gradlew composeDown
docker maven (not worked, use regular terminal command)
#./mvnw clean package com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:up
#./mvnw com.dkanejs.maven.plugins:docker-compose-maven-plugin:1.0.1:down
./mvnw; docker-compose -f docker-compose-maven.yaml up --build
docker-compose -f docker-compose-maven.yaml down -v

generated using daggerok-fatjar yeoman generator

inside:

  1. java 8 based parent multi project

  2. vavr (javaslang)

  3. support maven

  4. support gradle

  5. docker / docker-compose support

3. Other repos

5. Enjoy! :)