Profiles

When developing Spring Boot applications, it’s common to define specific configurations for different environments, such as development, testing, and production. Spring Boot provides a powerful way to manage these configurations using profiles.

Frequently, developers need custom configurations when running applications in development mode or during testing. This necessity has become so routine that it’s almost considered boilerplate code to define these configurations in every project.

Arconia enhances the developer experience by building on top of Spring Boot. It provides these common configurations out of the box, allowing developers to focus more on writing application logic and less on repetitive setup tasks.

By default, the Arconia Dev Tools library provides two profiles that are enabled automatically in certain conditions:

  • dev: Enabled when running the application in development mode (e.g. ./gradlew bootRun or ./mvnw spring-boot:run).

  • test: Enabled when running tests or when running the application in test mode (e.g. ./gradlew bootTestRun or ./mvnw spring-boot:test-run).

Enabling/Disabling Profiles

Arconia profiles are enabled by default in development mode or during testing. You can disable them via configuration properties.

arconia:
  dev:
    profiles:
      enabled: false

Configuration Properties

Each organization may have its own set of custom profiles to manage development and testing environments. For example, instead of having a dev profile, you may have a local profile where you define the configuration for your local development environment. That’s why Arconia makes these profiles configurable.

Table 1. Profiles Configuration Properties

Property

Default

Description

arconia.dev.profiles.development

dev

Names of the development profiles.

arconia.dev.profiles.test

test

Names of the test profiles.

Both properties accept a list of profiles. For example, you can define multiple profiles to be activated when running tests:

arconia:
  dev:
    profiles:
      test: dev, test