Using IntelliJ IDEA to develop Micronaut applications

This guide teaches you how to set up IntelliJ IDEA to develop Micronaut applications.

1. IntelliJ IDEA features for Micronaut Framework

IntelliJ IDEA comes in two flavors Ultimate and Community Editions. You can develop Micronaut applications with the community edition. However, the Ultimate edition has several extra features tailored to the Micronaut Framework.

IntelliJ IDEA provides the following:

  • Coding assistance specific to the Micronaut API and the configuration file parameters. For example, when writing query methods, generating HTTP requests for defined endpoints, and so on.

  • Integration with the Bean Validation and Endpoints tool windows.

  • A dedicated project creation wizard based on launch.micronaut.io.

  • A dedicated run configuration for Micronaut applications.

2. IntelliJ IDEA and Gradle

You can build Micronaut Framework with Gradle. The Micronaut Gradle Plugin offers a great development experience.

IntelliJ IDEA supports Gradle out of the box both in the community and ultimate editions.

3. Build and run actions

Some features such as test resources rely on the Micronaut Gradle Plugin being used to run and test your application.
build and run using gradle
  • In the Settings dialog (⌘ ,), go to Build, Execution, Deployment | Gradle.

  • On the Gradle settings page, in the Gradle Projects section, select a Gradle project you need.

  • In the Build and run using list, select the appropriate option and click OK to save the changes.

3.1. Enable annotation Processing

If you don’t delegate build and run actions to gradle, make sure to enable annotation processing for Java and Kotlin applications

annotationprocessorsintellij

4. License

All guides are released with an Apache license 2.0 license for the code and a Creative Commons Attribution 4.0 license for the writing and media (images…​).