Sometimes the hardest part of any project is getting started. Tasks such as creating the structure for various project artifacts, creating a build file, determining maven coordinates, and picking the right dependency versions can be boring and repetitive. Initializers like the Spring Initializr aim to remove much of this toil so you can focus on your coding.  

But tragically, Axon Framework isn’t available in the Spring Initializr. So at AxonIQ, we felt it was high time that we corrected this glaring oversight by providing our very own AxonIQ Initializr just for you, our loyal Axonians!

What is the AxonIQ Initializr?

The AxonIQ Initializr is a web application that creates an Axon project structure for you. It doesn’t generate any application code, but it will give you a solid project structure, offering either a Maven or a Gradle build specification to suit your needs. Once you’ve downloaded your generated project, all that remains is to unzip, open, and begin work on your Axon code. 

Of course, the AxonIQ Initializr is open source and based on the excellent Spring Initializr project, so it’s easy to maintain. This means you can even fork the AxonIQ Initializr and customize it to your exact requirements.

Getting Started

Getting started with AxonIQ Initializr couldn’t be simpler. Just navigate to start.axoniq.io in the browser of your choice. Once there, specify your application coordinates (GroupID, ArtifactID, etc), the project type you would like (Maven or Gradle), your choice of language, and which version of Java you’d like to use. From that point, you are then able to specify what dependencies your project requires. The Axon Framework (axon-spring-boot-starter) and Axon Test (axon-test) dependencies are included in every project by default. 

If you wish to include additional dependencies, just click on the blue ‘plus’ icon in the upper right corner. This brings up the search dialog allowing you to find and select many other common dependencies such as Actuator, Lombok, or DevTools. To download your new project, simply click the blue ‘Download’ button at the bottom of the screen. Extract the project from the zip file, open the project in your IDE, and begin adding your Axon code!

In addition to the web browser interface, you can also access the AxonIQ Initializr from a command-line app such as curl, or within your favorite IDE such as IntelliJ IDEA or Eclipse. By way of an example, a simple application can be generated from curl using the following command:

curl https://start.axoniq.io/starter.zip -d dependencies=web,data-jpa,h2 -o my-project.zip

If you would like to use the AxonIQ Initializr from inside IntelliJ IDEA (Ultimate Edition only), no problem! It’s possible to do this from the ‘New Project’ dialog using the ‘Spring Initializr’ option on the left.  After you have chosen this option, customize the Server URL by clicking on the gear next to the Server URL and entering https://start.axoniq.io. This will allow you to create a new project. 

This capability is also available from within Eclipse if you have the Spring Tools Add-On installed from the Eclipse Marketplace.  From within Eclipse use the ‘New Project’ dialog and choose ‘Spring Starter Project’ under the Spring Boot option. This brings up a dialog that allows you to customize the Service URL to https://start.axoniq.io.

Feedback

We built the Axon Initializr for you ‒ our fabulous community ‒ to make getting started with Axon easier, faster, and less bothersome than before.  We want to know what you think about it, what you would like to see added to it, and of course, your contributions to speed up development and add cool new features.  

You can give your feedback using the AxonIQ Initializr Feedback category in the AxonIQ discuss platform.

Related Articles

Podcast Exploring Axon about the AxonIQ Initializr

AxonIQ Academy Frequently Asked Questions

Axon Quick Start Guide - YouTube

Subscribe to blog notifications