Learn how to add HTTPS encryption to your Spring Boot application running inside a Docker container. Since the arrival of free Let’s Encrypt certificates, there is really no excuse not to use HTTPS for encrypting your application traffic. Obtaining and ...

Ignoring the semantics of HTTP methods such as GET and POST can have disastrous security repercussions. You might think that using GET methods for deleting entities is fine since you only need to pass a single identifier and do not ...

In this article, I will demonstrate how to install Java OpenJDK 14 on macOS Catalina in 2020. If you are interested in installing OpenJDK 15 (which is the newest version as of this writing), please see this article: How to ...

In this post, I am showing you how to use the freely available Open Weather Map API to retrieve hourly weather forecasts 48 hours into the future for a given place using Python without external packages. Continue reading if you ...

Flash messages (one-time notifications) are commonly used to display the result of an operation to your users: Spring Boot offers this exact functionality in the RedirectAttributes interface. It uses the FlashMap data structure to store the flash messages as key-value ...

Spring Sessions allows you to persist user sessions into a database. Combined with Spring Security, it is easy to create a setup where each logged in user is represented by a row in a SPRING_SESSION table. Externalising sessions into a ...

Different deployment environments (e.g., development, testing, staging and production) often require that different pieces of code are switched on and off. For example, you only want to send real emails in production and write to an email log in all ...

Stop repeating yourself. Emails and messages in general often consist of repeated content blocks that never change. Greetings and signatures are perfect examples: some people even try to eliminate such “noise” from messages (for example, the “nohello”-movement). While it is ...

Measuring code execution times is hard. Learn how to eliminate systematic and random measurement errors and obtain more reliable results. We often need to measure how long a specific part of code takes to execute. Unfortunately, simply measuring the system ...

Question: In my Thymeleaf template, I want to output the size of a list of objects. For example, for the list List<String> list = Arrays.asList("Go", "Python", "Scala"); the result should be 3. How is this possible using just Thymeleaf syntax? ...

Bernhard Knasmüller on Software Development