-
Notifications
You must be signed in to change notification settings - Fork 59
Project Configuration
Subhrodip Mohanta edited this page Apr 3, 2026
·
1 revision
This project uses standard Spring Boot configuration patterns, leveraging application.properties and environment-specific profiles.
We use three main profiles to manage different environments:
| Profile | Purpose | Data Source |
|---|---|---|
dev |
Local development | Local MySQL / MariaDB |
test |
Unit and Integration testing | In-memory H2 Database |
prod |
Production deployment | Cloud-managed MySQL |
To run the application with a specific profile:
./mvnw spring-boot:run -Dspring-boot.run.profiles=devThe application uses environment variables for sensitive or environment-specific data. These are defined in your .env file and mapped in the application*.properties files.
Key variables include:
-
MYSQL_DB_HOST: The hostname of your MySQL server. -
MYSQL_DB_PORT: The port (default 3306). -
MYSQL_DB_UNAME: Database username. -
MYSQL_DB_PASSWD: Database password. -
JWT_SECRET: Secret key for signing JWT tokens. -
JWT_EXPIRATION: Token expiration time in milliseconds.
-
src/main/resources/application.properties: Base configuration shared across all environments. -
src/main/resources/application-dev.properties: Overrides for local development. -
src/main/resources/application-test.properties: Optimized for fast testing with H2. -
src/main/resources/application-prod.properties: Hardened settings for production.