Arconia Dev Services

Arconia Dev Services provide zero-code integrations for services your application depends on, both at development and test time, relying on the power of Testcontainers and Spring Boot.

For example, if your application needs a database, you can use PostgreSQL Dev Service to automatically start a PostgreSQL database when you run your application or integration tests. This eliminates the need to manually start and manage the database during development and testing.

Dev Services are only supposed to be used during development and testing. They are not included in production builds.

How They Work

For each supported service, Arconia provides a dedicated module that you can include in your project. When you add the module to your project, the service is automatically started when you run your application in development mode or integration tests.

You can think of the Arconia Dev Services as a higher-level feature built on top of Spring Boot’s support for Testcontainers. The goal is to provide a seamless developer experience by automatically starting the services your application depends on without any additional code or configuration.

Arconia Dev Services are also transparent to the developer, meaning that you don’t need to change your development workflow to use them. Unlike the lower-level Testcontainers support in Spring Boot, Arconia doesn’t require special tasks to run your application when using Dev Services (./gradlew bootTestRun or ./mvnw spring-boot:test-run) nor requires you to define a separate @SpringBootApplication class for configuring Testcontainers. Instead, it lets you run your application via the usual tasks provided by the Spring Boot plugins for Gradle or Maven, or using the Arconia CLI.

  • CLI

  • Gradle

  • Maven

arconia dev
./gradlew bootRun
./mvnw spring-boot:run

Your integration tests will also automatically use the Arconia Dev Services without any additional configuration.

Sharing Dev Services

Dev Services can be shared across applications, allowing you to reuse the same service across multiple applications. For example, you can share the RabbitMQ Dev Service and use it for exchanging messages between applications during development. Refer to the documentation of each Dev Service to check if it is shared by default and when. There are three options:

  • never: The service is never shared across applications.

  • dev-mode: The service is shared across applications only if the application is running in development mode.

  • always: The service is always shared across applications when enabled (development and test mode).

This capability relies on the Reusable Containers feature of Testcontainers, which is disabled by default. You can enable it in the ~/.testcontainers.properties file in your home directory. If the file does not exist, you can create it. It should contain the following line:

testcontainers.reuse.enable=true

Startup Sequence

The spring.testcontainers.beans.startup property controls the startup sequence of the Dev Services. It can be set to parallel or sequential. By default, Dev Services are started sequentially.