A simple CRUD (Create, Read, Update, Delete) application built with Spring Boot to manage users with attributes name, age, and sex.
This project was developed for learning and practicing Spring Boot, JPA, Thymeleaf, and PostgreSQL.
- List all users
- Create new users
- Edit existing users
- Delete users
- Data persisted using PostgreSQL
- Simple web interface built with Thymeleaf
- Java 17+
- Spring Boot
- Spring Data JPA
- Thymeleaf
- PostgreSQL
- Maven
- Lombok
Before running the project, make sure you have installed:
- Java 17 or higher
- Maven 3.8+
- PostgreSQL 13+
Update the application credentials according to your local setup:
server.port=PORT
spring.datasource.url=DB_URL
spring.datasource.username=DB_USERNAME
spring.datasource.password=DB_PASSWORDDB_USERNAME and DB_PASSWORD with your PostgreSQL credentials.
git clone https://github.com/yourusername/usercrud.git
cd usercrudmvn clean installmvn spring-boot:run| Method | Endpoint | Description |
|---|---|---|
| GET | /users |
List all users |
| GET | /users/new |
Show form to create a new user |
| POST | /users |
Save new user |
| GET | /users/edit/{id} |
Show form to edit user |
| GET | /users/delete/{id} |
Delete user by ID |
- Make sure you are using Java 17 or newer.
- The project uses Spring Boot’s embedded Tomcat, so no external server configuration is required.
- If you make changes to the model, you may need to drop and recreate the database.
As an educational project, I welcome contributions from third parties so that we are always learning and improving; all help is welcome.
This project is open-source and available for educational purposes.
Feel free to modify and use it as a base for your own learning or experiments.
🧠 Author: Gustavo Viega