completed DTO realisation, added requirments to pom.xml - #2
Merged
Conversation
fetis-off
reviewed
Jan 26, 2026
| @RequiredArgsConstructor | ||
| @RestController | ||
| @RequestMapping("/books") | ||
| public class BookControllerImpl { |
There was a problem hiding this comment.
Suggested change
| public class BookControllerImpl { | |
| public class BookController { |
Impl ending needed when you implements the interface.
fetis-off
reviewed
Jan 26, 2026
|
|
||
| @Override | ||
| public Optional<Book> findById(Long id) { | ||
| return Optional.ofNullable(sessionFactory.openSession().find(Book.class, id)); |
There was a problem hiding this comment.
I see that you opened a session and didn't close it. So let's use try-with-resources.
fetis-off
reviewed
Jan 26, 2026
| @@ -13,13 +17,28 @@ public class BookServiceImpl implements BookService { | |||
| @Autowired | |||
There was a problem hiding this comment.
Suggested change
| @Autowired |
@Autowired annotation is redundant here. Remove it please.
fetis-off
suggested changes
Jan 26, 2026
fetis-off
left a comment
There was a problem hiding this comment.
Good one! Left a few comments.
And one additional comment: Please, update .gitignore file. Folders .idea and .target should not be in repository
Elena-Bruyako
suggested changes
Jan 26, 2026
Elena-Bruyako
left a comment
There was a problem hiding this comment.
fix conflicts in branch
see comment
Comment on lines
+22
to
+23
| System.out.println("DTO: " + bookDto); | ||
| System.out.println("DTO author = " + bookDto.getAuthor()); |
There was a problem hiding this comment.
Suggested change
| System.out.println("DTO: " + bookDto); | |
| System.out.println("DTO author = " + bookDto.getAuthor()); |
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.
No description provided.