Small Java/Maven project developed for Programacao II. It demonstrates a JDBC connection to PostgreSQL and reads customer records from a database table.
- Java 21
- Maven
- PostgreSQL
- JDBC
Set the database connection through environment variables:
export PROGRAMACAO2_DB_URL="jdbc:postgresql://<host>:5432/postgres?sslmode=require"
export PROGRAMACAO2_DB_USER="<user>"
export PROGRAMACAO2_DB_PASSWORD="<password>"mvn -DskipTests packageRun the org.example.Main class from an IDE or Maven-compatible Java runner after configuring the environment variables.