Java · Spring · Thymeleaf · Htmx
Production-ready Spring Boot, crafted carefully.
I'm Wim Deblauwe, a software developer specialized in Java and Spring. I write books, maintain open-source projects like error-handling-spring-boot-starter, and publish practical, battle-tested articles here.
just start typing — try thymeleaf, testcontainers or htmx
Taming Thymeleaf
Server-side rendering with Spring Boot, step by step.
Modern frontends with htmx
Hypermedia-driven UIs with Spring Boot & Thymeleaf.
Recent posts
showing 10 of 126- Feb 1, 2020 Example usage of testcontainers cypress My project testcontainers-cypress allows to run Cypress tests from JUnit using the excellent Testcontainers project. In this blog post, I will show how to get started with the project in a very simple Spring Boot application.
- Dec 20, 2019 Customization of Asciidoctor PDF output This blog post was written for asciidoctor-pdf 1.x. If you are using asciidoctor-pdf 2.x, then be aware that you need to use pdf-themesdir and pdf-theme in the Maven configuration. So replace: <attributes> <pdf-stylesdir>${project.basedir}/src/main/asciidoc/theme</pdf-stylesdir> <pdf-style>pegus-digital</pdf-style> </attributes> with: <attributes> <pdf-themesdir>${project.basedir}/src/main/asciidoc/theme</pdf-themesdir> <pdf-theme>pegus-digital</pdf-theme> </attributes> Using Asciidoc (the markup language) with the Asciidoctor toolchain is one of our favorite ways to write documentation. We mainly use it to create API documentation from our REST API backends using Spring REST Docs. Asciidoctor supports a variety of output formats, where HTML and PDF are ones we used the most. While the default PDF output already looks very good, it is always nice to be able customize the output a bit to better align with the project the documentation is created for. This post will explain exactly how to do that.
- Oct 27, 2019 Using primary key objects with Spring Data and Hibernate Most of the tutorials or blog posts that use Spring Data JPA use auto-generated primary keys. This post shows how you can use primary key objects instead of primitives like Long or UUID.
- Oct 20, 2019 Spring Boot and Thymeleaf with CSS JavaScript processing using Gulp This blog post will explain how to setup a Spring Boot project with server-side HTML rendering using Thymeleaf templates.
- Jun 16, 2019 Ensure JUnit test fails when Cypress tests fail In my previous blog post on Running Cypress tests with TestContainers for a Spring Boot with Thymeleaf application, I explained how to run Cypress tests as part of a JUnit test. However, the example did not actually fail the test if there are test failures in Cypress. Oops :-) In order to do that, we can use the support that Testcontainers has for watching the log output and parse that. This is the full code that will accomplish this and it will also print the number of run tests, number of passed tests and the number of failed tests:
- Jun 15, 2019 Running Cypress tests with TestContainers for a Spring Boot with Thymeleaf application UPDATE: The full test class code in this post does not actually fail the test when the Cypress tests fail. See my updated example at ./blog/2019/06/16/ensure-junit-test-fails-when-cypress-tests-fail/[Ensure JUnit test fails when Cypress tests fail]. At the last ng-be conference I saw a demo of Cypress. Cypress allows to do functional testing of your web application, quite similar to Selenium for example, but still quite different. Ever since that time, I wanted to try it out, but never got around to it until this week. My application is not a Single Page Application, but after reading the post End-to-End Testing Web Apps: The Painless Way I was convinced that it should be doable for my Spring Boot application that uses Thymeleaf for Server Side Rendering of the HTML pages.
- Feb 21, 2019 Announcing BIOB an binary object storage library I am announcing a new open-source project I am working on: BIOB It is still very early days, but there is already a fully functional local file system implementation and an in-memory implementation for testing. See https://github.com/wimdeblauwe/biob for full details and a usage example on how to use the library in your own project. It does not depend on Spring or Spring Boot, but I have used it in that context so far because that is what I use for all of my projects.
- Dec 24, 2018 Version 1.0.2 of Practical Guide to Building an API Back End with Spring Boot released You can download an updated version of my book 'Practical Guide to Building an API Back End with Spring Boot' from InfoQ: https://www.infoq.com/minibooks/spring-boot-building-api-backend The changelog can be viewed at https://wimdeblauwe.wordpress.com/my-spring-boot-book/
- Sep 26, 2018 Switching between JDK 8 and 11 using SDKMAN I have written about switching JDK versions on your mac before. With JDK 11 now being out, it is time to give an updated version.
- Sep 10, 2018 Spring Boot book published via Infoq I am so happy because today my Spring Boot book is finally available! See https://www.infoq.com/minibooks/spring-boot-building-api-backend for all the details.
no matches for "" — browse the full archive →