A simple client registration web application built with Spring Boot, Spring MVC, Spring Data JPA, Thymeleaf, and an H2 database.
This project allows you to register, list, edit, and remove client records through a web interface, with validation for name, email, and age.
This project is a lightweight CRUD example built with the Spring ecosystem. It demonstrates how to create a full-stack Java web application using:
- Spring Boot
- Spring MVC
- Spring Data JPA
- Thymeleaf
- H2 Database
- Register new clients
- View all saved clients
- Edit existing client information
- Remove clients from the registry
- Validate required form fields
- Persist data using JPA
- Access the H2 database console locally
- Java 17
- Spring Boot 3.x
- Spring Web MVC
- Spring Data JPA
- Thymeleaf
- Hibernate
- H2 Database
Before running the project, make sure you have:
- Java 17+
- Maven
From the project root, run:
./mvnw spring-boot:runOn Windows:
mvnw.cmd spring-boot:runThen open the app in your browser:
http://localhost:8080/
The H2 console is enabled and can be accessed at:
http://localhost:8080/h2-console
Use the following connection settings:
JDBC URL: jdbc:h2:file:./data/clientes-db
Username: sa
Password: (empty)
/— List all clients/novo/— Open the form to create a new client/salvar— Save a client/editar/{id}— Edit a specific client/remover/{id}— Delete a client
src/
├── main/
│ ├── java/
│ │ └── com/minhaempresa/cadastroclientes/
│ │ ├── controller/
│ │ ├── model/
│ │ ├── repository/
│ │ └── service/
│ └── resources/
│ ├── application.properties
│ ├── static/
│ └── templates/
├── test/
│ └── java/
└── docs/
└── screenshots/
The Cliente entity contains:
idnomeemailidade
These fields are validated using Java Bean Validation annotations.
This is a simple learning project and a good example of how to build a CRUD web application with Java and Spring. It can be expanded with features like filtering, pagination, REST APIs, authentication, or a modern frontend.

