Aug 27, 2022
This is the 3rd and final part of my series on live reloading with Thymeleaf and Spring Boot, this time focusing on Tailwind CSS.
Read More...
Jul 4, 2022
In my blog post of yesterday, I explained how to use Thymeleaf live reload with npm scripts. Quickly after announcing the blog post on Twitter, Oliver Drotbohm asked me why I didn’t just use Spring Boot DevTools instead. A valid question and one I will address in this follow-up post.
Read More...
Jul 3, 2022
UPDATE: I created a follow-up blog Thymeleaf live reload with Spring Boot DevTools that shows a way to have Live Reload with a little less setup work, but some important drawbacks as well in my opionion. Be sure to read both blog posts to get an informed opinion about which path to take. If you want to add Tailwind CSS to your project, go to Thymeleaf live reload with Spring Boot and Tailwind CSS after you applied what is shown here. In my book Taming Thymeleaf I use Gulp to setup the frontend build pipeline and have live reloading during development. For the workshop I gave at Spring I/O 2022 Barcelona, I used a different approach using NPM scripts. This avoids the extra gulp dependency with sometimes things that are not up-to-date anymore.
Read More...
Jun 15, 2022
The htmx JavaScript library has a very neat feature called Out of Band Swaps. This blog post shows how to use this with Thymeleaf.
Read More...
Apr 11, 2022
My error-handling-spring-boot-starter library had its first release almost 2 years ago. The first reported issue came soon after with a request to support Spring WebFlux. As I don’t have any Spring WebFlux projects myself, it was pretty low on my priority list. Especially as it did not seem trivial to add support.
Luckily, about a month ago Fabio Marini opened a PR with all the building blocks I needed to add support for Spring WebFlux to the library.
Version 3.0.0 has now been released which can be used with Spring WebFlux.
Read More...
Mar 21, 2022
I migrated a project from Bootstrap 4 with the Sleek dashboard template to Tailwind CSS as Bootstrap 4 stopped having bugfixes on 2021-07-01, and there is no version for Bootstrap 5. Anyways, I like Tailwind CSS a lot more to work with :)
One of the components that the project used is Bootstrap Toggle, which makes a simple checkbox look a lot better. As the project kicked out Bootstrap, I needed to build a replacement for it. This blog entry will explain how I did so step-by-step using Tailwind CSS and Alpine.js.
Read More...
Feb 23, 2022
I released a new version 2.1.0 of the Error Handling Spring Boot Starter last week. It supports nice error messages for validation of request parameters now. This blog post shows some more detail on how you can do validation of request parameters.
Read More...
Nov 23, 2021
My book Taming Thymeleaf has been updated for Java 17, Spring Boot 2.6 and Tailwind CSS 3.0. This update is free for all Leanpub readers.
Read More...
Nov 23, 2021
This blog post uses htmx 1.6. In htmx 1.7, server-sent events support has been moved to an extension. The example code on GitHub has been updated to work with htmx 1.7. See commit b46b15b for the (small) changes that are needed.
It is possible to push information from a Spring Boot backend to the UI using either Websockets or Server-Sent Events.
This blog post will show how to use Thymeleaf with HTMX to push information from the server to the UI with Server-Sent Events.
Read More...
Nov 18, 2021
The hibernate-types library has extra types that are not found in Hibernate by default.
One of the most interesting aspects of the library is the support for JSON types. Unfortunately, by default, the library will not pick up any Jackson configuration or custom serializers defined in your Spring Boot project.
This blog post will show how to configure things so the JSON related configuration of Spring Boot is used.
Read More...