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 130- Feb 26, 2020 Value Objects with Spring Boot REST API In Using primary key objects with Spring Data and Hibernate, I explained how to use Value Objects for interaction with the database. This time, I will focus on how to do something similar at "the other end" of the application, in the REST API.
- Feb 17, 2020 Using Tailwind CSS with Spring Boot and Thymeleaf Tailwind CSS is an interesting utility-first CSS framework for rapidly building custom designs. It is perfectly possible to use this in a Java Spring MVC application that uses Thymeleaf for server-side rendering.
- Feb 11, 2020 Testcontainers-cypress release 0.4.0 Testcontainers-cypress 0.4.0 is released with support for Cypress 4.0.1 which has Firefox support.
- Feb 5, 2020 Welcome to the new blog This post marks the start of the new blog at https://www.wimdeblauwe.com. The content of the old blog at https://wimdeblauwe.wordpress.com/ has all been migrated here. Do let me know if there would be an error or something missing on a page.
- 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.
no matches for "" — browse the full archive →