entry, Model
model.addAttribute("entries", guestbook.findAll());
- return new HtmxResponse()
- .addTemplate("guestbook :: entries");
+ return new HtmxResponse.Builder()
+ .view("guestbook :: entries")
+ .build();
}).orElseThrow(() -> new ResponseStatusException(HttpStatus.NOT_FOUND));
}
diff --git a/src/main/java/guestbook/GuestbookForm.java b/src/main/java/guestbook/GuestbookForm.java
index 7ad5f67..cbc42b0 100644
--- a/src/main/java/guestbook/GuestbookForm.java
+++ b/src/main/java/guestbook/GuestbookForm.java
@@ -22,7 +22,8 @@
* particularly designed to also be able to capture invalid input, so that the raw form data can be bound and validated
* against business constraints using code and / or annotations.
*
- * Note how the fields are annotated with the {@link NotBlank} annotation, which tells Spring how to validate the values.
+ * Note how the fields are annotated with the {@link NotBlank} annotation, which tells Spring how to validate the
+ * values.
*
* @author Oliver Drotbohm
* @see GuestbookController#addEntry(GuestbookForm, org.springframework.validation.Errors, org.springframework.ui.Model)