This project is a Spring Boot application for managing products. It uses JPA for data persistence, H2 for the initial in-memory database, and later migrates to MySQL for production.
To get started with this project, follow these steps:
- Java 8 or higher installed
- Maven installed
- IntelliJ IDEA Ultimate installed
- xampp installed
- Clone the repository.
git clone https://github.com/3310N/JEE_Spring_MVC_Thymeleaf.git
- Open the project in IntelliJ IDEA.
- Run the project.
- Open a web browser and navigate to
http://localhost:8085
.
The application allows you to perform the following operations:
- Afficher les patients
- Faire la pagination
- Chercher les patients
- Supprimer un patient
- Faire des améliorations supplémentaires
- Learn how to create a Spring Boot application
- Learn how to use JPA for data persistence
- Learn how to use H2 for an in-memory database
- Learn how to migrate from H2 to MySQL
- Java
- Spring Boot
- JPA
- H2
- MySQL
- Lombok
- Creation of Spring project with the dependencies JPA, H2, Spring Web, and Lombok
-
Creation of the JPA entity Product with the attributes:
id of type Long
,name of type String,
,price of type double,
,quantity of type int
.
- Configuration of the perstance properties in the application.properties file
- Creation of the ProductRepository interface that extends the JpaRepository interface
- Tests of the ProductRepository interface
- Merge From H2 to MySQL
- Implementation of the Restful API ProductRestService
This project is licensed under the MIT License - see the LICENSE file for details.
LICENSE
Copyright (c) 2024 EL Mahdi Masbah
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.