Open
Conversation
nemoguigrat
reviewed
Mar 23, 2025
|
|
||
| dependencies { | ||
| implementation("org.springframework.boot:spring-boot-starter") | ||
| implementation("org.projectlombok:lombok:1.18.30") |
There was a problem hiding this comment.
лучше будет указать в compileOnly и версию можно не указывать
|
|
||
| @Override | ||
| public void createTransaction() { | ||
| System.out.println("Create Withdraw Transaction"); |
There was a problem hiding this comment.
Ты ведь здесь же в классе логирование используешь, зачем System.out?)) Всегда используй логгер, вместо System.out
| import org.springframework.stereotype.Controller; | ||
|
|
||
| @Slf4j | ||
| @Controller |
There was a problem hiding this comment.
Почему Controller? никаких web вызовов я не увидел
|
|
||
| @Slf4j | ||
| @Service | ||
| @Primary |
There was a problem hiding this comment.
неудачное использование Primary, можно обойтись и без него (да и без Qualifire). Используй внедрение через имя поля (когда имя поля соответствует имени бина).
Как правило Qualifire это дурной тон, аннотация хоть и бывает полезной в определенных случаях (как и Primary) но в реальном мире ее стараются не использовать
Comment on lines
+27
to
+35
| public void deposit() { | ||
| deposit.createTransaction(); | ||
| deposit.transaction(); | ||
| } | ||
|
|
||
| public void withdraw() { | ||
| withdraw.createTransaction(); | ||
| withdraw.transaction(); | ||
| } |
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.
Псевдосервис банковских транзакций.