
JDBC Tutorial How to Connect to a Database Step by Step
Connect to PostgreSQL with JDBC, run queries and updates with prepared statements, read results safely and manage transactions, in one runnable example.
Tag
10 posts

Connect to PostgreSQL with JDBC, run queries and updates with prepared statements, read results safely and manage transactions, in one runnable example.

Create a Quarkus 3 project, add a REST endpoint with JSON, run it in dev mode and write a test, in about fifteen minutes and with no prior Quarkus knowledge.

Add JUnit 5 to a Maven or Gradle project, write a first test, run it from the command line and read the output, in about fifteen minutes.

Build a first Vaadin Flow application with a form, a grid and a button, entirely in Java, then run it and see how the server-side model works.

Build a first Jakarta Faces 4 page with a Facelets view, a CDI bean and a form, run it on a servlet container and understand what each part does.

Create a Play Framework application in Java with sbt, add a route, a controller and a template, run it in dev mode and read what Play generates.

Create a Micronaut 4 application, add a REST controller and a service, run it and test it, and see how compile-time injection differs from Spring.

Create a Maven project, read the pom, add a dependency and a test, then build a jar with one command and understand the directory layout.

Build a small Struts 2 web application with Maven, a login form, an action class and a struts.xml mapping, and run it on a servlet container.

Build a small REST API with Spring Boot 4 and JDK 25: generate the project, write a controller, add an in memory service, validate input and run the tests.