Spring Multirabbit

SpringBoot doesn’t offer a very easy way of handling multiple RabbitMQ servers without introducing the complexity of SpringCloud Stream or the need to manually provide multiple connection factories in code. The spring-multirabbit library solves this problem, requiring none or minimal changes to the code and very simple extension of the configuration. How to use? Add spring-boot-starter-amqp and spring-multirabbit into the dependencies of the project. Bellow, an example for Maven. <dependency> <groupId>com.

Read More

Two and a half years away

It’s been a long time since a last published a post on the blog. Shame shame shame! My last published post was Your first SpringBoot app in 5 steps on September 2019, 2.5 years ago. SpringBoot was in its version 2.0.8. Today, SpringBoot is in version 2.6.6. But why did this happen? The reason is clear: laziness! Kidding! Or better described… partially kidding! Besides a bit of laziness, many things happened during this time:

Read More

Your first SpringBoot app in 5 steps

SpringBoot is made to be powerful and easy! It’s very nice to work with and you will need only these 5 steps for your first app in a Maven project: Define the SpringBoot parent lib Define the dependency to the SpringBoot web library Define the Maven plugin for SpringBoot Create the main method Create a controller with an endpoint Parent SpringBoot lib This is the main and first step when creating a SpringBoot application.

Read More

5 popular decorators from Java

As a software developer, you probably know the Decorator Design Pattern, described in GoF. If not, read this first. Java has some nice decorators that can make your life easier, or tougher, depending on the case. Below, you will see a list of five decorators present in Java that you didn’t even realize they were decorations. java.util.Collections.synchronizedList(List list) Java 8 provides many synchronizedX() methods, for lists, sets, maps, etc. They are analog.

Read More

The Decorator design pattern in software development

A decorator is like a picture frame. It wraps the main object, adding some other functionality to it. The main goal of the Decorator pattern is to enable the addition of functionalities or behaviors dynamically to objects. To enable additional functionalities or behaviors in classes, a simple inheritance could easily do the job and no design pattern would be necessary. However, pay attention to the term “dynamically”. It means that the decorator must be instantiated after the original object already exists, and therefore inheritance couldn’t be the best solution.

Read More

about me

Hi. I’m Wander Costa, husband, software developer, and coffee lover. At present, I’m working as Engineering Manager at FREE NOW. I was always fascinated by programming since I was a kid. Today, as a software developer and two decades after writing my first scripts, I work with programming languages and technology to solve problems of real users. I’m also very interested in performance, distributed systems, open-source software and code readability.

Read More

My Development Environment

Hi there! This is the very first post of my blog, and I decided to start with my development environment. Need to make it clear that this is my first blog, however, I ever wanted to create one. So, here we go…

Read More