A simple CRUD (Create, Read, Update, Delete) application built with Spring Boot, JSP, and H2 Database. This project demonstrates basic operations on items with properties like name, description, and price.
- Java 17
- Spring Boot 3.2.0
- Spring MVC
- Spring Data JPA
- JSP (JavaServer Pages)
- H2 Database
- Maven
- Lombok
- Create new items
- Read/List all items
- Update existing items
- Delete items
- In-memory H2 database
- Simple and responsive UI
Before running this application, make sure you have the following installed:
- Java JDK 17 or later
- Maven 3.6 or later
- Your favorite IDE (IntelliJ IDEA, Eclipse, or VS Code)
-
Clone the repository:
[email protected]:dwbessa/JSP-CRUD.git cd JSP-CRUD
-
Build the project:
mvn clean install
-
Run the application:
mvn spring-boot:run
-
Access the application:
- Open your web browser and navigate to
http://localhost:8080 - The application will redirect you to the items page at
http://localhost:8080/items
- Open your web browser and navigate to
-
Access H2 Database Console (optional):
- Navigate to
http://localhost:8080/h2-console - JDBC URL:
jdbc:h2:mem:testdb - Username:
sa - Password: (leave empty)
- Navigate to
Key application properties (in src/main/resources/application.properties):
- Server port: 8080
- H2 Database configuration
- JSP view resolver configuration
- JPA configuration
- Logging levels
Feel free to fork this project and submit pull requests for improvements.
If you find any issues or have suggestions, please create an issue in the repository.
This project is open source and available under the MIT License.