17.2 Profiles

Profiles are project templates, consisting of a “skeleton” project structure with default configuration, build dependencies and other assets, along with a set of commands for generating application-appropriate artifacts (such as controllers, client interfaces, etc).

Profiles can inherit from other profiles, augmenting/overriding defaults set in their parent. All profiles inherit from the base profile, which provides the bare minimum required to set up a Micronaut application.

Many Micronaut apps will use the service profile, which augments the base profile to add HTTP client/server libraries, create-controller and create-client commands, and other features that are appropriate for web service applications. This is the default profile used when running the create-app command.

Other Micronaut apps will be better served by the cli profile, which adds the create-command command and the picocli library for parsing command line input. This is the default profile used when running the create-cli-app command.

You can view all of the built-in profiles using the CLI command list-profiles.

Profiles can be chosen using the profile flag on the create-app, create-cli-app, and create-federation commands.

  1. $ mn create-app my-project --profile rabbitmq