13 prevent the duplication of vendors#14
Merged
XavierJCallait merged 28 commits intomainfrom Aug 9, 2025
Merged
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR migrates from Hibernate configuration to Spring Boot with JPA for data access, while implementing vendor deduplication functionality and restructuring the package structure from model/util to app.* packages.
- Removes manual Hibernate configuration in favor of Spring Boot auto-configuration
- Implements vendor deduplication logic through VendorService that prevents duplicate vendor names
- Restructures the entire codebase to use proper
app.*package naming convention
Reviewed Changes
Copilot reviewed 29 out of 29 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/main/java/app/InventoryApp.java | Converts main class to Spring Boot application with CommandLineRunner for database testing |
| src/main/java/app/service/VendorService.java | Adds service layer with vendor deduplication logic |
| src/main/java/app/repository/VendorRepository.java | Creates Spring Data JPA repository for vendor operations |
| src/main/java/app/model/Vendor.java | Updates vendor model to use auto-generated UUIDs and unique constraints |
| src/main/java/app/model/Product.java | Removes manual UUID handling, adds weight field, reorders constructor parameters |
| src/main/java/app/util/EnvironmentVariableInitializer.java | Updates environment variable names to Spring Boot conventions |
| pom.xml | Adds Spring Boot dependencies and changes formatter goal from check to apply |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Prevents the duplication of vendors in database. Should it occur, error handling will be done gracefully <- I hope.