-
Notifications
You must be signed in to change notification settings - Fork 11
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
Пришлось немного подредактировать application.yml из-за того, что pos… #2
base: master
Are you sure you want to change the base?
Conversation
…tgre не нравились имя базы данных и пользователя.
url: jdbc:postgresql://localhost:5432/home-budget | ||
username: user | ||
password: myPass | ||
url: jdbc:postgresql://localhost:5432/homebudget |
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.
Ну с такой правкой оно уже у меня не будет работать :-)
Это выглядит как правка, которая важна только для вашего окружения. Такие вещи лучше не коммитить, по крайней мере, в глобальный файл application.yaml
. Для таких целей можно сделать свой собственный application-debug.yaml
, внести свои специфичные правки уже в него и запускать приложение с профилем debug
.
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.
В целом неплохо, только верните application.yaml :-)
* @author Trokhin | ||
* | ||
*/ | ||
public interface ICategoryService { |
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.
Пока что интерфейс выглядит излишним. Хотя, конечно, так тоже можно.
public CategoryDTO getByID(@PathVariable("id") Long id) { | ||
CategoryDTO categoryDTO = categoryService.get(id); | ||
|
||
if(categoryDTO == null) |
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.
Не проще ли бросить exception сразу из сервиса? Всегда проще работать в предположении, что сервис не вернул null (ибо что с ним делать-то?).
…tgre не нравились имя базы данных и пользователя.