Running the API Registro Pendientes in production requires Java 21, a PostgreSQL database, and a writable directory for file uploads. This guide walks you through building the application artifact, supplying the required configuration, and verifying that the service is healthy.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/CLINTONARMANDO/apiregistropendientes/llms.txt
Use this file to discover all available pages before exploring further.
Prerequisites
Before deploying, make sure the target machine has the following available:- Java 21 — the application is compiled for Java 21 and will not start on earlier versions.
- PostgreSQL — a running instance accessible from the deployment host. The API uses JDBC with the
org.postgresql.Driver. - A writable filesystem path for uploaded images (the
uploads/directory relative to the working directory).
The database schema is managed automatically via
spring.jpa.hibernate.ddl-auto=update. Tables are created or altered on startup — no manual migration step is needed for a first-time deploy.Building the application
Clone the repository and navigate to the project root
Ensure the Maven wrapper script is executable before running any build commands.
Configuration
The application reads its settings fromapplication.properties (or application.yml) bundled inside the JAR. You must override the database connection properties at runtime — never bake real credentials into the committed source file.
Required properties
| Property | Description |
|---|---|
spring.datasource.url | JDBC URL of your PostgreSQL instance |
spring.datasource.username | Database username |
spring.datasource.password | Database password |
Supplying overrides
- Command-line arguments
- Environment variables
- External properties file
Pass property overrides directly to the
java command. This is the simplest approach for scripted deployments.Running the application
Start the JAR from the directory where theuploads/ folder should live (typically the deployment root):
0.0.0.0:8080 by default, making it reachable on all network interfaces.
To run as a background process using nohup:
File upload storage
Uploaded images are stored on the local filesystem under theuploads/notas/ directory, relative to the process working directory. The directory is created automatically on first use, but the parent path must be writable by the OS user running the process.
The static resource handler exposes the directory at /uploads/**:
For production deployments behind a load balancer or with multiple instances, replace the local
uploads/ directory with a shared volume or object storage (e.g., S3-compatible). Update WebConfig to point to the new resource location accordingly.File size limits
The following limits are configured by default:| Setting | Value |
|---|---|
| Max single file size | 50 MB |
| Max request size | 50 MB |
Connection pool
The API uses HikariCP with a deliberately small pool configuration, suited for managed database plans with limited connection quotas:| Setting | Value | Notes |
|---|---|---|
maximum-pool-size | 5 | Hard cap on concurrent DB connections |
minimum-idle | 1 | Keeps one connection warm |
idle-timeout | 30 s | Idle connections are released after 30 seconds |
max-lifetime | 30 min | Connections are recycled every 30 minutes |
connection-timeout | 30 s | Request fails if no connection is available within 30 seconds |
Health check
The API is ready to serve traffic when port 8080 responds to HTTP requests. A simple check:200 OK response confirms the application started successfully.
For automated health checks (e.g., in Docker or a load balancer), target the Swagger UI or any public endpoint:
API documentation
The interactive Swagger UI is available at:Summary
Build
./mvnw clean package -DskipTests — produces the runnable JAR in target/.Configure
Supply
spring.datasource.url, username, and password via command-line args or environment variables.Run
java -jar target/apiregistropendientes-0.0.1-SNAPSHOT.jar — binds to port 8080.Verify
Hit
http://your-host:8080/swagger-ui/index.html — a 200 response means the API is live.