spring boot

A collection of 44 posts

A Java geek
  • Me
  • Books
  • Speaking
  • Mentions
  • Focus
Aug 3, 2025 observability opentelemetry distributed tracing spring boot quarkus kotlin coroutines

OpenTelemetry Tracing on the JVM

You may know I’m a big fan of OpenTelemetry. I recently finished developing a master class for the YOW! conference at the end of the year. During development, I noticed massive differences in configuration and results across programming languages. Even worse, differences exist across frameworks inside the same programming language.

Nicolas Fränkel
Feb 9, 2025 devops testing unit testing integration testing flyway spring boot github actions

Pull request testing on Kubernetes: testing locally and on GitHub workflows

Imagine an organization with the following practices: Commits code on GitHubRuns its CI/CD pipelines with GitHub ActionsRuns its production workload on KubernetesUses Google Cloud A new engineer manager arrives and asks for the following: On every PR, run integration tests in a Kubernetes cluster similar to the production one. It sounds reasonable.

Nicolas Fränkel
Aug 4, 2024 opentelemetry tracing spring boot java agent micrometer

OpenTelemetry Tracing on Spring Boot, Java Agent vs. Micrometer Tracing

My demo of OpenTelemetry Tracing features two Spring Boot components. One uses the Java agent, and I noticed a different behavior when I recently upgraded it from v1.x to v2.x. In the other one, I’m using Micrometer Tracing because I compile to GraalVM native, and it can’t process Java agents. I want to compare these three different ways in this post: Java agent v1, Java agent v2, and Micrometer Tracing.

Nicolas Fränkel
Mar 12, 2023 grpc spring boot apache apisix

gRPC on the client side

Most inter-systems communication components that use REST serialize their payload in JSON. As of now, JSON lacks a widely-used schema validation standard: JSON Schema is not widespread. Standard schema validation allows delegating the validation to a third-party library and being done with it. Without one, we must fall back to manual validation in the code. Worse, we must keep the validation code in sync with the schema.

Nicolas Fränkel
Nov 13, 2022 spring boot architecture microservices

Spring Modulith: have we reached modularity maturity?

One of the main reasons to design microservices is that they enforce strong module boundaries. However, the cons of microservices are so huge that it’s like chopping off your right hand to learn to write with the left one; there are more manageable (and less painful!) ways to achieve the same result. Even since the microservices craze started, some cooler heads have prevailed.

Nicolas Fränkel
Dec 5, 2021 spring boot tip architecture demo

Multiple Spring Boot applications in the same project

I frequently use the Spring Boot framework in my demos. The latest one is no different. It shows how to achieve CQRS using two different code paths: the command part is implemented via Spring Data JPAthe query part via jOOQ My use case is a banking application that offers a REST layer allowing clients to call any parts.

Nicolas Fränkel
Nov 14, 2021 graalvm native image spring boot

Native-image with Spring Boot

The Cloud has enabled a lot of new usages that were not possible before. Among them stands Serverless: Serverless computing is a cloud computing execution model in which the cloud provider allocates machine resources on demand, taking care of the servers on behalf of their customers. Serverless computing does not hold resources in volatile memory; computing is rather done in short bursts with the results persisted to storage.

Nicolas Fränkel
Apr 11, 2021 spring data spring boot customization

Your own custom Spring Data repository

Frameworks promise to speed up one’s development pace provided one follows the mainstream path. The path may be more or less narrow. I’m a big fan of the Spring ecosystem because its design is extensible and customizable at different abstraction levels: thus, the path is as large as you need it to be. Functional Programming is becoming more and more popular. Spring provides a couple of DSLs for the Kotlin language.

Nicolas Fränkel
Feb 28, 2021 monitoring devops spring boot quarkus micronaut microprofile

Monitoring across frameworks

Gone are the times when developers' jobs ended with the release of the application. Nowadays, developers care more and more about the operational side of IT: perhaps they operate applications themselves, but more probably, their organization fosters increased collaboration between Dev and Ops. I started to become interested in the Ops side of software when I was still a consultant. When Spring Boot released the Actuator, I became excited.

Nicolas Fränkel
Jan 10, 2021 jar assembly shade spring boot maven

Creating self-contained executable JARs

When your application goes beyond a dozen of lines of code, you should probably split the code into multiple classes. At this point, the question is how to distribute them. In Java, the classical format is the Java ARchive, better known as the JAR. But real-world applications probably depend on other JARs. This post aims to describe ways to create self-contained executable JARs, also known as uber-JARs or fat JARs. What is an executable JAR? A JAR is just a collection of class files.

Nicolas Fränkel
Dec 20, 2020 maven logging log4j2 slf4j spring boot

Feedback on the Log4J2 hack in Spring Boot

Last week, I wrote a post that described how to hack the Maven dependency resolution system. I admit it was a dirty hack, it’s even in the post name. But I got it wrong. Thanks Stéphane Nicoll for pointing it out: "It boils down to excluding the spring-boot-starter-logging in every Spring Boot starter"Since you've put every in bold, I assume you meant it. That's actually wrong and not what the documentation states.Here is an example: https://t.

Nicolas Fränkel
Dec 13, 2020 maven hack logging log4j2 slf4j spring boot

A dirty hack to ease the usage of Log4J2 in Spring Boot

Logging is one of the fundamental components of any application which runs in production. Yet, between performance and logging in critical environments, I’d favor the former. For that reason, modern logging frameworks should implement at least two requirements: Async appenders: the write operation shouldn’t be blocking the execution of the programLazy computation: the framework doesn’t run expensive computations until they are needed - or never if that’s the case.

Nicolas Fränkel
Nov 15, 2020 spring boot quarkus cloud native

From Spring Boot to Quarkus

Last week, I migrated a sample Spring application to Micronaut. This week, I did the same for Quarkus. Spring Boot and Micronaut both offer a parent POM. Quarkus favors using a BOM.

Nicolas Fränkel
Nov 8, 2020 spring boot micronaut cloud native

From Spring Boot to Micronaut

In the last couple of years, I’ve been playing a bit with a generation of tools in the Java world, namely Micronaut, Quarkus and GraalVM. While I’m a Spring Boot fan since its beginning, I believe this quite an eye-opening opportunity. In this post, I’d like to see how easy, or how hard, it is to port a simple Spring Boot application to Micronaut. Setting up the context The JVM is an great piece of technology.

Nicolas Fränkel
Oct 11, 2020 container docker spring boot

A Hitchhiker's Guide to Containerizing (Spring Boot) Java Apps

Containerizing an application based on a 'scripting' language is straightforward. Add the sources, download the dependencies, and you’re good to go. One could say they are WYSIWYR. With compiled languages in general, and Java in particular, things are a bit different. In this post, I’d like to list some alternatives to achieve that.

Nicolas Fränkel
Aug 5, 2018 spring boot intellij idea ide

Spring Boot integration in IntelliJ IDEA

If you’re developing with Spring Boot, IntelliJ IDEA does offer a lot of niceties to speed up development. Let’s browse through some of them.

Nicolas Fränkel
Jul 22, 2018 spring boot dsl functional clean code

Refining functional Spring

Last week, I wrote on how to migrate an existing Spring Boot application with a functional approach toward configuration. Since then, I got interesting feedback, and I had a presentation on that subject at Rockstar Night in Kiev, which made me think further. Here’s how I would refine my previous code.

Nicolas Fränkel
Jul 15, 2018 spring boot dsl functional reactive

Spring Boot, migrating to functional

In the latest years, there has been some push-back against frameworks, and more specifically annotations: some call it magic, and claim it’s hard to understand the flow of the application. It’s IMHO part of a developer’s job to know about some main frameworks. But it’s hard to argue in favor of annotations when there are more annotations than actual code.

Nicolas Fränkel
Jun 24, 2018 webapp homebrew spring boot

Distributing webapps via Homebrew

Distributing Java webapps via Docker is pretty widespread. However, regarding replacing desktop applications, it suffers from a not-so-great integration with the user’s desktop. On OSX, a quite popular distribution channel is Homebrew. Let’s dedicate this post to check how to distribute our desktop webapp via Homebrew.

Nicolas Fränkel
Jun 17, 2018 webapp docker spring boot

Distributing desktop webapps via Docker

Two weeks ago, we studied how to replace desktop Java apps with Java webapps. Now is the time to think about distributing such desktop webapps. The current trend now is to use Docker. I assume readers are at least familiar with the technology. The most straightforward way is to create a WAR and deliver it inside a Tomcat image. Another option is to create a fat JAR with Tomcat embedded as per the previous post, and run it inside a image with the JRE only.

Nicolas Fränkel
Jun 3, 2018 webapp spring boot desktop

Webapps desktop integration

Though I fancy myself a backend developer, I love the frontend. It’s always magic to visualize what you coded. Believe it or not, 15 years ago, I wrote JavaScript to dynamically add rows to an HTML table for Internet Explorer 5.5. That was called Dynamic HTML. But I was still a Java developer at heart.

Nicolas Fränkel
May 20, 2018 devops micrometer metrics spring boot

Metrics with Spring Boot 2.0 - Counters and gauges

Last week, I wrote about how one could migrate metrics from Spring Boot 1.5 to Spring Boot 2.0. This week, it’s time to check the different metrics available in Spring Boot 2.0 and how to create them. Meter There are 4 main types of metrics available: CounterGaugeTimerDistribution summary To keep the post readable in one piece, it will be limited to Counter and Gauge All metrics inherit from the base Meter class. A Meter provides basic measurement storage capabilities.

Nicolas Fränkel
May 13, 2018 devops metrics spring boot

Metrics with Spring Boot 2.0 - Migration

I’ve already written about the excellent monitoring features available in Spring Boot. In Spring Boot 2.0, there has been a major rewrite regarding how the /metrics endpoint is designed. This is the subject of this post.

Nicolas Fränkel
Apr 22, 2018 devops metrics spring boot monitoring

Spring Boot 2.0 actuator change analysis

Some years ago, I discovered the Spring Boot actuator: Spring Boot includes a number of additional features to help you monitor and manage your application when it’s pushed to production. You can choose to manage and monitor your application using HTTP endpoints, with JMX or even by remote shell (SSH or Telnet). Auditing, health and metrics gathering can be automatically applied to your application.

Nicolas Fränkel
Apr 15, 2018 spring boot maven software architecture

Multiple modules in Spring Boot apps

Spring Boot is a huge success, perhaps even more so than its inceptors hoped for. There is a lot of documentation, blog posts, and presentations on Spring Boot. However, most of them are aimed toward a feature, like monitoring or configuring. Few - if any of them, describe real-world practices. In this post, I’d like to highlight how to design a Spring Boot having multiple modules.

Nicolas Fränkel
Oct 22, 2017 java 9 spring boot modules jigsaw

Migrating a Spring Boot application to Java 9 - Modules

Last week, I tried to make a Spring Boot app - the famous Pet Clinic, Java 9 compatible. It was not easy. I had to let go of a lot of features along the way. And all in all, the only benefit I got was improvement of String memory management. This week, I want to continue the migration by fully embracing the Java 9 module system.

Nicolas Fränkel
Oct 15, 2017 java 9 spring boot modules jigsaw

Migrating a Spring Boot application to Java 9 - Compatibility

With the coming of Java 9, there is a lot of buzz on how to migrate applications to use the module system. Unfortunately, most of the articles written focus on simple Hello world applications. Or worse, regarding Spring applications, the sample app uses legacy practices - like XML for example. This post aims to correct that by providing a step-to-step migration guide for a non-trivial modern Spring Boot application. The sample app chosen to do that is the Spring Pet clinic.

Nicolas Fränkel
May 28, 2017 war jar javaee spring boot archive

What archive format should you use, WAR or JAR?

Some time ago, RAM and disk space were scarce resources. At that time, the widespread strategy was to host different applications onto the same platform. That was the golden age of the application server. I wrote in an earlier post that the current tendency toward cheaper resources will make it obsolete, in the short or long term. However, a technology trend might bring it back in favor.

Nicolas Fränkel
Apr 23, 2017 spring boot design

Fixing my own Spring Boot starter demo

Since one year or so, I try to show the developer community that there’s no magic involved in Spring Boot but rather just straightforward software engineering. This is achieved with blog posts and conference talks. At jDays, Stéphane Nicoll was nice enough to attend my talk and pointed out an issue in the code. I didn’t fix it then, and it came back to bite me last week during a Pivotal webinar.

Nicolas Fränkel
Mar 19, 2017 spring mvc actuator spring boot

Fully configurable mappings for Spring MVC

As I wrote some weeks earlier, I’m trying to implement features of the Spring Boot actuator in a non-Boot Spring MVC applications. Developing the endpoints themselves is quite straightforward. Much more challenging, however, is to be able to configure the mapping in a properties file, like in the actuator. This got me to check more closely at how it was done in the current code. This post sums up my 'reverse-engineering' attempt around the subject.

Nicolas Fränkel
Feb 5, 2017 jvm security jar spring boot policy

Signing and verifying a standalone JAR

This is the 3rd post in the JVM Security focus series. Last week, I wrote about the JVM policy file that explicitly lists allowed sensitive API calls when running the JVM in sandboxed mode. This week, I’d like to improve the security by signing the JAR.

Nicolas Fränkel
Feb 5, 2017 jvm security spring boot policy

Proposal for a Java policy files crafting process

This is the 2nd post in the JVM Security focus series. I’ve already written about the JVM security manager, and why it should be used - despite it being rarely the case, if ever. However, just advocating for it won’t change the harsh reality unless some guidelines are provided to do so. This post has the ambition to be the basis of such guidelines. As a reminder, the JVM can run in two different modes, standard and sandboxed.

Nicolas Fränkel
Dec 4, 2016 elasticsearch metrics spring boot monitoring devops jmx jest jolokia

Feeding Spring Boot metrics to Elasticsearch

This week’s post aims to describe how to send JMX metrics taken from the JVM to an Elasticsearch instance. Business app requirements The business app(s) has some minor requirements. The easiest use-case is to start from a Spring Boot application. In order for metrics to be available, just add the Actuator dependency to it: <dependency> <groupId>org.springframework.

Nicolas Fränkel
Nov 10, 2016 spring boot spring framework spring cloud sleuth post-processor convention over configuration

Another post-processor for Spring Boot

Most Spring developers know about the BeanPostProcessor and the BeanFactoryPostProcessor classes. The former enables changes to new bean instances before they can be used, while the latter lets you modify bean definitions - the metadata to create the bean.

Nicolas Fränkel
Feb 21, 2016 logging spring boot

Log management in Spring Boot

Logging is for sure not a glamorous subject, but it’s a critical one - at least for DevOps and Ops teams. While there are plenty of material on the Web describing how to change your ASCII banner, there is not much on how to efficiently manage the log output. By default, Spring Boot will output log on the console and not use any file at all. However, it’s possible to tell Spring Boot to log in an output file. At the simplest level, the path where Spring Boot will put the spring.

Nicolas Fränkel
Feb 14, 2016 spring boot

Designing your own Spring Boot starter – part 2

In the last post, I tried to describe the internal working of Spring Boot starter. It’s now time to develop our own! As an example, we will use XStream, a no-fluff just-stuff XML/JSON (de)serializer offered by Thoughtworks. Readers who only use JAXB and Jackson are advised to have a look at XStream, it’s extremely efficient and its API is quite easy to use. As seen in our last post, the entry-point of a starter lies in the META-INF/spring.factories file.

Nicolas Fränkel
Feb 7, 2016 spring boot

Designing your own Spring Boot starter - part 1

Since its release, Spring Boot has been a huge success: it boosts developers productivity with its convention over configuration philosophy. However, sometimes, it just feels too magical. I have always been an opponent of autowiring for this exact same reason. And when something doesn’t work, it’s hard to get back on track. This is the reason why I wanted to dig deeper into Spring Boot starter mechanism - to understand every nook and cranny.

Nicolas Fränkel
Jan 10, 2016 kotlin spring boot vaadin

Playing with Spring Boot, Vaadin and Kotlin

It’s no mystery that I’m a fan of both Spring Boot and Vaadin. When the Spring Boot Vaadin add-on became GA, I was ecstatic. Lately, I became interested in Kotlin, a JVM-based language offered by JetBrains. Thus, I wanted to check how I could develop a small Spring Boot Vaadin demo app in Kotlin - and learn something in the process. Here are my discoveries, in no particular order.

Nicolas Fränkel
Oct 11, 2015 heroku microservices spring boot

Going the microservices way - part 3

This is the 3rd post in the Going the microservices way focus series. In the first post of this serie, I created a simple microservice based on a Spring Boot + Data JPA stack to display a list of available products in JSON format. In the second part, I demoed how this app could be uploaded on Pivotal Cloud Foundry. In this post, I’ll demo the required changes to deploy on Heroku.

Nicolas Fränkel
Oct 4, 2015 cloud foundry microservices pivotal spring boot

Going the microservices way - part 2

This is the 2nd post in the Going the microservices way focus series. In my previous post, I developed a simple microservices REST application based on Spring Boot in a few lines of code. Now is the time to put this application in the cloud. In the rest of the article, I suppose you already have an account configured for the provider. Pivotal Cloud Foundry is the Cloud offering from Pivotal, based on Cloud Foundry.

Nicolas Fränkel
Sep 27, 2015 microservices spring boot

Going the microservices way - part 1

This is the 1st post in the Going the microservices way focus series. <div class='paragraph'> <p><a href='https://en.wikipedia.org/wiki/Microservices' target='_blank' rel='noopener'>Microservices</a>, are trending right now, whether you like it or not. There are good reasons for that as it resolves many issues organizations are faced with.

Nicolas Fränkel
Jul 19, 2015 devops spring boot

More DevOps for Spring Boot

I think Spring Boot brings something new to the table, especially concerning DevOps - and I’ve already written a post about it. However, there’s more than metrics and healthchecks. In one of another of my previous post, I described how to provide versioning information for Maven-built applications. This article will describe how this later post is not necessary when using Spring Boot.

Nicolas Fränkel
Mar 8, 2015 devops metrics spring boot

Become a DevOps with Spring Boot

Have you ever found yourself in the situation to finish a project and you’re about to deliver it to the Ops team. You’re so happy because this time, you covered all the bases: the documentation contains the JNDI datasource name the application will use, all environment-dependent parameters have been externalized in a property file - and documented, and you even made sure logging has been implemented at key points in the code.

Nicolas Fränkel
Oct 26, 2014 application server microservices spring boot

On resources scarcity, application servers and micro-services

While attending JavaZone recently, I went to a talk by Neal Ford. To be honest, the talk was not something mind-blowing, many tools he showed were either outdated or not best of breed, but he stated a very important fact: application servers are meant to address resources scarcity by sharing resources, while those resources are no more scarce in this day and age. In fact, this completely matches my experience. Remember 10 years ago when we had to order hardware 6 months in advance?

Nicolas Fränkel
A Java geek © 2008-2026
v. bc04c88300c3ec997ce8470fbff5395dc9e518b1/13264050981
Latest Posts