-
Notifications
You must be signed in to change notification settings - Fork 0
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
JPA #3
JPA #3
Conversation
… endpoints introduced
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.
Good job! Let's improve your solution!
pom.xml
Outdated
<dependency> | ||
<groupId>org.liquibase</groupId> | ||
<artifactId>liquibase-core</artifactId> | ||
<version>${liquibase.version}</version> |
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.
First, you don't create alias liquibase.version in properties your pom file.
Second, spring-boot-starter-parent already include liquibase, so you don't need to specify the version here.
@@ -16,4 +17,6 @@ public interface BookMapper { | |||
BookDto toDto(Book book); | |||
|
|||
Book toBook(CreateBookRequestDto bookRequestDto); | |||
|
|||
void updateBookFromDto(CreateBookRequestDto book, @MappingTarget Book entity); |
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.
updateBook will be better
|
||
public interface BookRepository { | ||
Book save(Book book); | ||
public interface BookRepository extends JpaRepository<Book, Long> { |
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.
Annotation Repository is missing
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.
LGTM
Liquibase added, repository now uses JpaRepository. Delete and update endpoints introduced