Documentation Index Fetch the complete documentation index at: https://mintlify.com/Yurben-bit/Sistema-de-Administraci-n-Escolar-Backend/llms.txt
Use this file to discover all available pages before exploring further.
Application Configuration Overview
The EduTec Backend uses Spring Boot’s configuration system, with settings defined in application.properties located at src/main/resources/application.properties.
Default Configuration
The base application.properties file contains minimal configuration:
src/main/resources/application.properties
spring.application.name =edutec
Most configuration is currently using Spring Boot defaults. You’ll need to add database and other settings for production use.
Database Configuration
Development with H2 (In-Memory)
For quick development without MySQL setup, use H2 in-memory database. Add to application.properties:
# H2 Database Configuration
spring.datasource.url =jdbc:h2:mem:edutecdb
spring.datasource.driverClassName =org.h2.Driver
spring.datasource.username =sa
spring.datasource.password =
# JPA Configuration
spring.jpa.database-platform =org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto =create-drop
spring.jpa.show-sql =true
# H2 Console (Access at http://localhost:8080/h2-console)
spring.h2.console.enabled =true
spring.h2.console.path =/h2-console
Access the H2 console at http://localhost:8080/h2-console with JDBC URL jdbc:h2:mem:edutecdb and username sa.
Production with MySQL
For MySQL database connection, configure:
# MySQL Database Configuration
spring.datasource.url =jdbc:mysql://localhost:3306/edutec? useSSL =false& serverTimezone =UTC
spring.datasource.username =your_mysql_username
spring.datasource.password =your_mysql_password
spring.datasource.driver-class-name =com.mysql.cj.jdbc.Driver
# JPA Configuration
spring.jpa.hibernate.ddl-auto =update
spring.jpa.show-sql =true
spring.jpa.properties.hibernate.dialect =org.hibernate.dialect.MySQL8Dialect
spring.jpa.properties.hibernate.format_sql =true
DDL Auto Modes
The spring.jpa.hibernate.ddl-auto property controls database schema generation:
Mode Behavior Use Case createDrop and recreate schema on startup Initial development create-dropCreate on startup, drop on shutdown Testing updateUpdate schema without data loss Development validateOnly validate schema, no changes Production noneNo schema management Production (with Flyway/Liquibase)
Never use create or create-drop in production as it will delete all data!
JWT Configuration
Current Implementation
The JWT secret key is currently hardcoded in JwtService.java:
src/main/java/com/tecmilenio/edutec/security/JwtService.java
private static final String SECRET_KEY = "12345678910111213141516171819200" ;
Security Risk : The JWT secret key is hardcoded in the source code. This should be moved to environment variables before deployment.
Recommended: Environment Variable Configuration
To properly secure the JWT secret, modify JwtService.java to read from configuration:
Add to application.properties:
# JWT Configuration
jwt.secret =${JWT_SECRET:defaultSecretKeyForDevelopmentOnly123456789}
jwt.expiration =36000000
Update JwtService.java to use @Value annotation:
@ Value ( "${jwt.secret}" )
private String secretKey ;
@ Value ( "${jwt.expiration}" )
private long expirationTime ;
Set environment variable:
Linux/Mac
Windows (CMD)
Windows (PowerShell)
export JWT_SECRET = "your-secure-secret-key-at-least-256-bits"
Generate a secure random key: openssl rand -base64 32
Server Configuration
Configure the embedded Tomcat server:
# Server Configuration
server.port =8080
server.servlet.context-path =/api
# Logging
logging.level.root =INFO
logging.level.com.tecmilenio.edutec =DEBUG
logging.level.org.springframework.web =DEBUG
logging.level.org.hibernate.SQL =DEBUG
Spring Profiles
Use Spring profiles to manage different environments:
Create Profile-Specific Files
application-dev.properties (Development):
spring.datasource.url =jdbc:h2:mem:edutecdb
spring.h2.console.enabled =true
spring.jpa.show-sql =true
logging.level.com.tecmilenio.edutec =DEBUG
application-prod.properties (Production):
spring.datasource.url =jdbc:mysql://prod-db-server:3306/edutec
spring.datasource.username =${DB_USERNAME}
spring.datasource.password =${DB_PASSWORD}
spring.jpa.hibernate.ddl-auto =validate
spring.jpa.show-sql =false
logging.level.root =WARN
Activate Profiles
Command Line
Environment Variable
application.properties
./mvnw spring-boot:run -Dspring-boot.run.profiles=dev
Mail Configuration (Optional)
The project includes Spring Mail. To enable email functionality:
# Mail Configuration
spring.mail.host =smtp.gmail.com
spring.mail.port =587
spring.mail.username =${MAIL_USERNAME}
spring.mail.password =${MAIL_PASSWORD}
spring.mail.properties.mail.smtp.auth =true
spring.mail.properties.mail.smtp.starttls.enable =true
Session Management
The project uses JDBC session management:
# Session Configuration
spring.session.store-type =jdbc
spring.session.jdbc.initialize-schema =always
spring.session.timeout =1800s
Complete Example Configuration
Here’s a complete application.properties for local development:
# Application
spring.application.name =edutec
spring.profiles.active =dev
# Server
server.port =8080
# H2 Database
spring.datasource.url =jdbc:h2:mem:edutecdb
spring.datasource.driverClassName =org.h2.Driver
spring.datasource.username =sa
spring.datasource.password =
# JPA/Hibernate
spring.jpa.database-platform =org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto =create-drop
spring.jpa.show-sql =true
spring.jpa.properties.hibernate.format_sql =true
# H2 Console
spring.h2.console.enabled =true
spring.h2.console.path =/h2-console
# JWT
jwt.secret =${JWT_SECRET:defaultSecretKeyForDevelopmentOnly123456789}
jwt.expiration =36000000
# Session
spring.session.store-type =jdbc
# Logging
logging.level.root =INFO
logging.level.com.tecmilenio.edutec =DEBUG
Environment Variables Best Practices
Never commit secrets
Use .gitignore to exclude files containing sensitive data: .env
application-prod.properties
**/application-local.properties
Use environment variables for sensitive data
Database passwords: ${DB_PASSWORD}
JWT secrets: ${JWT_SECRET}
API keys: ${API_KEY}
Document required variables
Create a .env.example file with placeholder values: JWT_SECRET = your-secret-here
DB_PASSWORD = your-password-here
Use different values per environment
Development, staging, and production should have separate credentials.
Next Steps
Running Locally Start the application with your configuration
API Reference Explore available API endpoints