-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature/add dto layer #61
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🎉 Thank you @anishmu20 for your contribution! Your pull request has been submitted successfully. A maintainer will review it as soon as possible. We appreciate your support in making this project better.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @anishmu20,
Thank you for your prompt work on this issue. I appreciate your dedication to the project.
I have reviewed your work, and I need some changes.
- Check code comment and resolve them.
- Before making pull request always make sure to pull changes from upstream main branch.
Once again, thank you for your contribution! ❤️
@@ -37,6 +37,17 @@ | |||
<artifactId>spring-boot-starter-data-jpa</artifactId> | |||
</dependency> | |||
|
|||
<dependency> | |||
<groupId>org.projectlombok</groupId> | |||
<artifactId>lombok</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use lombok.
</dependency> | ||
<dependency> | ||
<groupId>org.modelmapper</groupId> | ||
<artifactId>modelmapper</artifactId> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't use modelmapper. Implement it manually
@@ -33,91 +41,5 @@ public class Book { | |||
@Column(name = "copies_available", nullable = false) | |||
private int copiesAvailable; | |||
|
|||
public Book() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why you remove this code. Don't use lombok.
@@ -1,2 +1,3 @@ | |||
spring.application.name=libraryman-api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this file as it was earlier.
@@ -4,42 +4,45 @@ | |||
## Make this file as it was earlier before commiting code | |||
|
|||
# Change this connection string to this format: jdbc:mysql://{ip_address}:{port}/{database_name} | |||
spring.datasource.url=jdbc:mysql://localhost:3306/Add_Your_Database_Name | |||
spring.datasource.url=jdbc:mysql://localhost:3306/DATABASE NAME |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Make this file as it was earlier
Overview:
This PR introduces several enhancements and corrections to the library management system, particularly focusing on the API functionalities and code maintainability. Below are the detailed changes made:
1.Added Data Transfer Object (DTO) Layer:
Implemented a DTO layer for the module whose entity is exposed in the controller. This change facilitates data encapsulation and improves the separation of concerns.
2.Corrected Borrowing API (BorrowBook API):
Resolved an issue where the BorrowBook API was returning null for both book and member records. The API is now functioning correctly and provides the expected output.
3.Updated Return Book API:
The Return Book API was previously not returning any value. This has been corrected, and the return structure now aligns with the borrowing API documentation.
4.Lombok Dependency Implementation:
Integrated Lombok to reduce boilerplate code. Getter and setter methods, as well as constructors, have been generated using Lombok annotations, enhancing code readability and maintainability.
5.Introduced ModelMapper:
Implemented ModelMapper to facilitate seamless conversion between DTO and entity objects, ensuring cleaner and more efficient data handling.
6.API Testing:
Conducted thorough testing of all APIs using Postman to ensure that all functionalities are working as expected.