Configuration Reference
All configuration properties live under the quarkus.morphium.* prefix in
application.properties. This page documents every available property.
Core Properties
| Property | Default | Description |
|---|---|---|
|
(required) |
MongoDB database name. |
|
|
Comma-separated |
|
– |
MongoDB username (optional). |
|
– |
MongoDB password (optional). |
|
|
Authentication database for SCRAM credentials. |
|
– |
MongoDB Atlas SRV connection string ( |
|
|
Read preference: |
|
|
Automatically create / verify indexes on startup. |
|
|
Maximum number of connections in the pool. |
|
|
Morphium driver implementation. Use |
Cache Properties
| Property | Default | Description |
|---|---|---|
|
|
Enable query-result caching for |
|
|
Global cache TTL in milliseconds. |
LocalDateTime Storage
| Property | Default | Description |
|---|---|---|
|
|
Store |
BSON ISODate (true) |
Legacy Map (false) |
|
|---|---|---|
New projects |
recommended |
– |
Compatible with Morphia-written data |
yes |
no |
Native date queries ( |
yes |
no |
Readable in Atlas UI / mongosh |
yes |
no |
SSL / TLS Properties
These properties configure encrypted connections and X.509 client-certificate authentication. See Advanced Topics: SSL/TLS for usage examples.
| Property | Default | Description |
|---|---|---|
|
|
Enable TLS for the MongoDB connection. |
|
– |
Authentication mechanism. Leave unset for SCRAM-SHA-256 (default). Set to |
|
– |
Path to the keystore file (JKS or PKCS12) containing the client certificate for X.509 / mutual TLS. Falls back to the JVM default keystore ( |
|
– |
Password for the keystore. |
|
– |
Path to the truststore file for validating the MongoDB server certificate. Falls back to the JVM default truststore when absent. |
|
– |
Password for the truststore. |
|
|
Allow invalid / self-signed hostnames in the server certificate. Do not enable in production. |
|
– |
Explicit X.509 subject DN to use as the MongoDB username. When absent, the subject DN is extracted automatically from the client certificate. |
Dev Services Properties (Build Time)
Dev Services configuration is resolved at build time and cannot be overridden at runtime. See Dev Services for details.
| Property | Default | Description |
|---|---|---|
|
|
Enable automatic MongoDB container in dev / test mode. |
|
|
Docker image for the MongoDB container. |
|
|
Database name injected as |
|
|
Start MongoDB as a single-node replica set. Enables multi-document transactions, change streams, and |
Health Check Properties (Build Time)
| Property | Default | Description |
|---|---|---|
|
|
Enable Morphium health checks (liveness, readiness, startup) via SmallRye Health. Health endpoints are available by default when the extension is present. |
Environment Variable Overrides
SmallRye Config automatically maps property names to environment variables. Replace dots with underscores and use upper case:
export QUARKUS_MORPHIUM_DATABASE=production-db
export QUARKUS_MORPHIUM_HOSTS=mongo1:27017,mongo2:27017
export QUARKUS_MORPHIUM_USERNAME=admin
export QUARKUS_MORPHIUM_PASSWORD=secret
export QUARKUS_MORPHIUM_SSL_ENABLED=true
Configuration Precedence
SmallRye Config resolves values in this order (highest priority first):
-
System properties (
-Dquarkus.morphium.database=…) -
Environment variables (
QUARKUS_MORPHIUM_DATABASE=…) -
.envfile in the project root -
application.properties(profile-specific:%dev.,%test.,%prod.) -
Default values defined in the extension