Further refined the example
authorKai Moritz <kai@juplo.de>
Sun, 27 Sep 2020 09:23:03 +0000 (11:23 +0200)
committerKai Moritz <kai@juplo.de>
Sun, 27 Sep 2020 17:54:19 +0000 (19:54 +0200)
commitee41a8be1e0c808cd74ff5118054adf98af447c8
treee37d3d1dc733d02b705367ab3b9dea45a0928feb
parent64108e90d14f6e85c76c463b460ba92307ef15cd
Further refined the example

* Introduced an ExampleService
* The service checks the answer for
  The Ultimate Question Of Life, The Universe And Everything
* Requests without any answer are tolarated, so that the page with the
  question can be rendered
* Only numbers (Integer) are allowed as answer.
* Negative numbers are not allowed as answers: the service answers with an
  empty Optional.
* The view contains a bug, that results in a 503 for negative answers.
src/main/java/de/juplo/demo/ExampleController.java
src/main/java/de/juplo/demo/ExampleService.java [new file with mode: 0644]
src/main/resources/templates/a.html [deleted file]
src/main/resources/templates/b.html [deleted file]
src/main/resources/templates/view.html [new file with mode: 0644]
src/test/java/de/juplo/demo/ExceptionHandlingApplicationTests.java