-
Notifications
You must be signed in to change notification settings - Fork 156
Project by Maxim Yakovlev #180
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
base: main
Are you sure you want to change the base?
Conversation
| SocksRepository socksRepository; | ||
|
|
||
| @RequestMapping(value = "/api/socks/income", method = RequestMethod.POST) | ||
| ResponseEntity<String> income (@RequestParam(value = "color") String color, @RequestParam(value = "cottonPart") int cottonpart, @RequestParam(value = "quantity") Long quantity) { |
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.
тут нужны транзакции
| return ResponseEntity.ok(statusMessage); | ||
| } | ||
|
|
||
| @RequestMapping(value = "/api/socks/outcome", method = RequestMethod.POST) |
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.
хорошо бы выделить бизнес - слой, потому что контроллер слишком умный получается, но в рамках этой задачи выглядит норм
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.
На самом деле, именно так я и думал. Если небольшое приложение разбить на большое количество маленьких классов, получается не слишком наглядно. Я попытался соблюсти баланс между простотой восприятия и потенциалом к дальнейшему расширению.
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.
На самом деле в реальной жизни абсолютно правильное решение
| @@ -0,0 +1,11 @@ | |||
| server.port = 8080 | |||
| server.context-path= | |||
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.
В целом с задачей справился, хорошее решение, рекомендация больше почитать про. SOLID и ООП - паттерны, а так же спринг
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.
Благодарю за комментарии, буду совершенствоваться дальше.
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.
я считаю, что с навыков создавать такие приложения уже достаточно для того, чтобы начать карьеру. В нашей команде уже вышел стажер. Может быть в другие команды сейчас, либо позже - но я советую начать практиковаться asap)
No description provided.