A product management system built using Spring Core with a Model-View-Controller (MVC) pattern. It supports operations to add, update, view, and delete products, using Hibernate for database interactions and MySQL for data storage.
- View a list of products
- Add new products
- Edit existing products
- Delete products
- Spring Core (MVC): Framework used for developing the application logic and handling web requests.
- JSP: Used for rendering server-side views.
- Hibernate: Object-relational mapping tool for interacting with the database.
- MySQL: Relational database for product storage.
- Maven: Dependency management and project building.
- Controller: Manages HTTP requests and application logic (product management).
- DAO (Data Access Object): Manages database interactions using Hibernate.
- Model: Represents the
Productentity. - View: Server-side rendered views with JSP pages.
- Java 8 or higher
- Maven
- MySQL database
- IDE like IntelliJ, Eclipse, or VS Code
- Clone the repository:
git clone <repository-url> cd product-registry
-
Create a MySQL database named
product_registry. -
Modify the database configurations in
spring-servlet.xml:<bean class="org.springframework.jdbc.datasource.DriverManagerDataSource" name="ds"> <property name="driverClassName" value="com.mysql.cj.jdbc.Driver"/> <property name="url" value="jdbc:mysql://localhost:3306/product_registry"/> <property name="username" value="your_username"/> <property name="password" value="your_password"/> </bean>
mvn clean install- Locate the generated WAR file in the target directory (
productapp.war). - Deploy it to Tomcat or any other servlet container.
Once deployed, visit http://localhost:8080/productapp/ in your browser.
/- Displays a list of products./addProduct- Form to add a new product./handle-form- Handles product creation./delete/{productId}- Deletes a product by its ID./update/{productId}- Updates a product's information.
Feel free to fork this project and submit pull requests for improvements or features.


