Skip to content

Kanban thymeleaf#1

Open
Bael wants to merge 10 commits into
masterfrom
kanban_thymeleaf
Open

Kanban thymeleaf#1
Bael wants to merge 10 commits into
masterfrom
kanban_thymeleaf

Conversation

@Bael
Copy link
Copy Markdown
Owner

@Bael Bael commented Oct 9, 2018

homework #9
Сделал канбан на серверных страницах, в целом странные ощущения, с SPA как то чище, есть интерфейс и апи, а тут контроллеры понамешаны и на логику и на возврат шаблонов.
kanban
Смотреть папку kanban-server

Comment thread Kanban.iml
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module> No newline at end of file
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Добавьте уже *.iml в .gitignore и удалите из репозитория)

return boardService.update(boardDTO);
}

@RequestMapping(value = {"/boards/edit"}, method = RequestMethod.POST)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

МОжно просто @PostMapping

return "redirect:/error";
}
model.addAttribute("boards", boardService.findAll());
return "redirect:/boards";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Клёво! Но я бы последни две строчки прямо в try бы и оставил.

String taskNotFoundHandler(TaskNotFoundException ex) {
return ex.getMessage();
}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

КРуто! А для REST контроллеров, это кстати можно сделать с помощью аннотации @ResponseStatus

}

@CrossOrigin(origins = "${client.url}")
@RequestMapping(method = RequestMethod.GET, value = "/stages/{id}/tasks")
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@GetMapping

value="Reset"/></p>
</form>
<form action="#" th:action="@{/boards/delete/(id=${board.id})}" method="post">
<p><input class="button is-danger" type="submit" value="Delete board"/></p>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Использование p - это только для большого абзаца текста, прям текста, как в книжке или статье.

В формах и на страницах использовать его не надо.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants