In one of the previous articles, we described the GraalVM native image technology. The main motivation of the previous article was our willingness to evaluate technology in context of usage in our apps in the future. However, there is one additional motivation which stands behind our interest in this topic, the open source project maintained … Continue reading "Going native: enabling Specification Argument Resolver for GraalVM"
Read MoreCategory: Spring
Super-fast Java with Spring Boot Native
Above the horizon of the Java ecosystem, a new star called “GraalVM” has started to shine. Are you tired of slow startups of your Java microservices, i.e. the time from starting the process to the service readiness seems to be too long? You have come to the right place. We decided to evaluate GraalVM by … Continue reading "Super-fast Java with Spring Boot Native"
Read MoreSpring Tips #2: Layered JARs with Spring Boot 2.3
Sample code referred in this article is available on GitHub. Using Docker containers for deployment of Java applications becomes more and more popular these days. To ship a new version of application you just build a Docker image with new version of JAR file and push it to the repository, so the deployment team can … Continue reading "Spring Tips #2: Layered JARs with Spring Boot 2.3"
Read MoreScaling down microservices
Microservice architecture became very popular in the last years. This approach has a lot of benefits, which are widely praised at conferences. Unfortunately, it is very common to forget about the problems and difficulties we may encounter. Those who know me a little, know that I have always been skeptical of this approach. In this … Continue reading "Scaling down microservices"
Read MoreSpring tips #1: structuring configuration for integration tests
Spring comes with a lot of features which support integration testing. We have MockMvc, TestRestTemplate and many other useful utilities. Nevertheless, building a proper test context for our app rests in our hands, and there are some pitfalls along the road. In today's article I would like to show you how to avoid one of them
Read MoreDecorating Spring @Components
It is a common situation when an existing Spring component requires some extensions. We have to add new functionality to the existing application. I would like to share my experience on how to deal with such situations in order to keep the application code clean and maintainable.
Read MoreWhen two beans collide
Today I would like to tell you about one mechanism of Spring IoC container that I think is a bit less known amongst programmers. We were not aware of it and it had caused us a bit of confusion lately. It seemed at first as if one of our beans had somehow disappeared.
Read MoreSome short thoughts on strategy pattern
Strategy is one of the most useful design patterns, which allows us to change algorithms or implementations of an operation during runtime. Typical use cases include validating or parsing data depending on some decisions made on the fly. And although the pattern is widely described in various sources and well known amongst programmers I think there is still a missing part in great number of examples we can find. Let me explain what I have in mind…
Read MoreAutomated validation of DB schema migrations
Object Relational Mapping frameworks, such as Hibernate, very often provide a way to automatically generate the database schema based on persistent classes. While it is very convenient as a proof of concept or for very simple applications, it is not a production ready approach. In reality you have to write scripts to version your schema … Continue reading "Automated validation of DB schema migrations"
Read MoreEffective RESTful search API in Spring
Flexible RESTful search is very often a must-have for a web application. While the concept is easy and not new, it is very often implemented in a repetitive and tedious way. In this post I will demonstrate an effective way of implementing search API with Spring Data and Specification Argument Resolver. Naive approach With Spring … Continue reading "Effective RESTful search API in Spring"
Read More