As our last blog for the year, here’s a quick tip to improve the exception handling in your Spring-MVC applications! Cross-controller error handling using ControllerAdvice In a Spring-MVC web application it’s common to use a class annotated with @(Rest)ControllerAdvice to handle uncaught exceptions via @ExceptionHandler methods. This way it’s easy to produce different HTTP responses […]
Getting out of a codependent relationship, or: how I moved to a healthy component-based Spring Security configuration
In a recent blog post, the Spring Security team announced that they’ll be deprecating the configuration setup where you subclass the WebSecurityConfigurerAdapter. Instead, you simply define beans that allow you to set up the SecurityFilterChain by calling methods on the HttpSecurity object, and configure the WebSecurity object using a configurer. These options have been available […]
Don’t let regulatory compliance hold you back!
Trifork works with several customers who are operating in businesses with strict regulations, like finance or online betting. Assuring that your software and processes are in compliance with these regulations is challenging, and can easily lead to a situation where compliance officers and thus organizations become risk-averse. Changes take weeks or even months to be […]
Customers Drive Modern Applications
As companies are moving more and more of their business online, it becomes ever so clear that this isn’t just a matter of offering an additional sales channel. Acquiring new customers, providing them with a service that lets them come back for more and adapting to their ever-changing demands requires a true digital transformation. As […]
The case of the lost id field
Chapter 1: a new case Morning arrived like a Windows Update you couldn’t postpone anymore, forcing you to accept a harsh new reality you didn’t ask for. As I biked by the Amstel river I wondered what the day would bring: I was visiting a client that was porting their old Spring-based monolith over to […]
I used Spring’s RestTemplate to fetch some JSON, and you won’t believe what happened next!
Motivation is an interesting thing. What is it that drives us? What makes you want to do the things you do on a daily basis? Over the course of my career I’ve noticed that irritation is one of my driving factors. At first you get slightly annoyed by something, and you can shake it off, […]
Spring I/O 2019: a Trifork report
In 2010 I spoke at a new conference that Sergi Almar was organizing in Madrid about Spring. At that time it was mostly focused on Spanish attendees, and quite small. Over the years the conference grew larger and larger, moved to Barcelona and became the biggest community-driven Spring conference in Europe, and probably the world, […]
CQRS replay performance tuning
We, as experienced users and consultants for Axon, encourage developers that work with Axon Framework or are considering working with it, to read the following blog by Frans van Buul from AxonIQ. This blog explains in a clear and structured way, how to avoid the pitfalls that can happen when replaying past events after changing/adding read models. […]
Come Fly With Me: Flyway usage patterns part I
Flyway is a tool for managing your relational database schema as it evolves while developing a project. It’s not restricted to just performing schema migrations: it can execute any type of SQL script, or even JDBC code, that you’d like to run before or at startup as part of deploying a new version of your […]
Integrating the AWS Parameter Store with Spring Cloud
I’ll tell you all my secrets (but I lie about my past)— Tom Waits – Tango till they’re sore tl;dr We’ve integrated the AWS Parameter Store with Spring Cloud so that it can be used as a secure configuration backend for services deployed to EC2, including ECS. This code has recently been merged in Spring Cloud […]