Migrate to Spring Data JDBC and Update Repositories#1
Merged
Conversation
- Replaced Spring JDBC with Spring Data JDBC dependencies in pom.xml - Updated Invoice entity to use Spring Data annotations - Modified repository interfaces and classes to extend Spring Data CrudRepository - Updated service methods to return Iterable<Invoice> instead of List<Invoice> - Ensured consistency and added necessary imports for Spring Data JDBC Details: - pom.xml: - Removed dependency for spring-boot-starter-jdbc - Added dependency for spring-boot-starter-data-jdbc - Updated Maven Compiler Plugin configuration - Invoice.java: - Added Spring Data annotations (@id, @column, @table) - Repository Classes: - Updated repository interfaces to extend CrudRepository - Removed custom repository implementations for compatibility with Spring Data JDBC - InvoiceService.java: - Changed method signatures to return Iterable<Invoice> instead of List<Invoice> - Updated method implementations to use Spring Data repository methods - Specific Invoice Service Implementations (InvoiceServiceNumber, InvoiceServicePrefix, InvoiceServicePrefixINV): - Changed method signatures to return Iterable<Invoice> instead of List<Invoice> - Updated method implementations to use Spring Data repository methods - Added necessary imports and handled exceptions appropriately This commit ensures that the core project is now aligned with Spring Data JDBC, facilitating easier repository management and more robust data handling.
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.
Details:
pom.xml:
Invoice.java:
Repository Classes:
InvoiceService.java:
Specific Invoice Service Implementations (InvoiceServiceNumber, InvoiceServicePrefix, InvoiceServicePrefixINV):
This commit ensures that the core project is now aligned with Spring Data JDBC, facilitating easier repository management and more robust data handling.