Overview
Trippins uses separate configuration files for the Spring Boot backend and Angular frontend. This guide covers all configuration options and environment-specific settings.Configuration can be overridden using environment variables in Docker deployments.
Spring Boot Configuration
The main configuration file is located atbackend/src/main/resources/application.properties.
Application Settings
Application identifier used in logging and monitoring
Template directory location for Mustache templates
File extension for Mustache template files
Database Configuration
Database Connection
Database Connection
JDBC connection URL for MySQL databaseLocal:
jdbc:mysql://localhost:3307/TrippinsDocker: jdbc:mysql://db:3306/TrippinsDatabase usernameDefault:
rootDatabase passwordLocal:
1234Docker: passwordJDBC driver classValue:
com.mysql.cj.jdbc.DriverJPA/Hibernate Configuration
JPA/Hibernate Configuration
Database schema generation strategyOptions:
update: Update schema without dropping datacreate: Drop and recreate schema on startupcreate-drop: Create on startup, drop on shutdownvalidate: Validate schema matches entitiesnone: No schema management
updateEnable SQL query logging in consoleDefault:
trueFormat SQL queries for readabilityDefault:
trueSSL/HTTPS Configuration
HTTPS port for the application serverDefault:
8443Path to the Java KeyStore file containing the SSL certificateDefault:
classpath:keystore.jksPassword for the KeyStore file
Password for the private key in the KeyStore
Email Service Configuration
The application uses Gmail’s SMTP server for sending emails. An app-specific password is configured for authentication.
SMTP Server Settings
SMTP Server Settings
SMTP Connection Properties
SMTP Connection Properties
Enable SMTP authenticationDefault:
trueEnable STARTTLS encryptionDefault:
trueRequire STARTTLS encryptionDefault:
trueConnection timeout in millisecondsDefault:
10000 (10 seconds)General timeout in millisecondsDefault:
10000 (10 seconds)Write timeout in millisecondsDefault:
10000 (10 seconds)Logging Configuration
Log level for Hibernate SQL queriesOptions:
TRACE, DEBUG, INFO, WARN, ERRORDefault: DEBUGLog level for SQL parameter bindingDefault:
TRACELog level for Spring Security operationsDefault:
DEBUGSPA Configuration
Path matching strategy for Spring MVCValue:
ant_path_matcher (required for Angular SPA routing)Security Configuration
Security settings are defined inSecurityConfiguration.java:
Authentication
Passwords are hashed using BCrypt with a default strength of 10.
JWT Configuration
JWT tokens are used for stateless authentication:The JWT secret is configured via the
JWT_SECRET environment variable in Docker deployments.CORS Configuration
Cross-Origin Resource Sharing is disabled by default:Authorization Rules
Public Endpoints
Public Endpoints
Accessible without authentication:
Authenticated Endpoints
Authenticated Endpoints
Require valid authentication:
User/Admin Endpoints
User/Admin Endpoints
Require USER or ADMIN role:
Admin-Only Endpoints
Admin-Only Endpoints
Require ADMIN role:
Angular Frontend Configuration
Frontend environment settings are infrontend/src/environments/environment.ts:
Base URL for the applicationDefault:
/Base URL for API endpointsDefault:
/v1/apiAngular uses relative URLs that are proxied to the Spring Boot backend on the same domain.
Environment-Specific Configuration
Development
Docker/Production
Environment variables override application.properties:Configuration Best Practices
Externalize Secrets
Never commit passwords, API keys, or JWT secrets to version control. Use environment variables or secret management services.
Use Environment Profiles
Create separate configuration files for different environments:
application-dev.propertiesapplication-prod.properties
Enable SSL in Production
Always use valid SSL certificates in production. Replace the self-signed certificate with one from a trusted CA.
Secure Database Credentials
Use strong passwords and restrict database access to application servers only.
Next Steps
Docker Deployment
Deploy Trippins using Docker containers
Database Setup
Configure the MySQL database and schema
