Sign in

In some cases, the application can’t contain the credentials inside the configuration files as usual, like application.yml or application.properties.

The main reason could be a security issue, that your configuration files can contain all secrets to access database, connect with external services and others credentials.

In this article, there will be a demonstration of how to resolve configuration properties for a Spring Boot Application reading values from AWS Parameter Store.

If you are working with AWS, you can use the AWS System Manager.


In a micro-services architecture, services need to communicate to each other. In a non-trivial backend, it’s common for HTTP calls to cascade over multiple services.

Think about a user service that offers an endpoint POST /users as part of the sign-up process. Now imagine that, as part of that endpoint handling, the user service calls an account service endpoint POST /accounts to persist account information and a notification service POST /notification endpoint to send an email to the user.

As part of the user service build, you want to test the servoce in isolation, i.e. …


In our daily jobs we often need to implement integration tests that will validate the feature implemented, in an environment as close as possible to production environment, if you consider the technologies that you are working with.

One of the most common cases is to startup a database docker container during the tests execution and to do this we can list two options:

  • Start docker compose with Gradle and run the tests, as you can see in our previous post the example how to do it — the link you can find here.
  • Manage the container during the test execution…

TL;DR: The code example for this guide can be found here: https://github.com/codeal-io/tutorials/tree/main/gradle-docker-compose

One common use case for backend systems is to rely on an external system such as databases or message streams. To properly test if everything is working as expected we must have integration tests where we spin up a local instance of the external service and connect to our tests. One way of achieving it is using gradle.

By the end of this guide we will manage to:

  • Spin up a postgres instance before our tests run
  • Connect our service with it using random docker ports
  • Put the…


Recently at work, while designing an API, we faced the question “should we put the user preferred language in the header or body“?

One of the comments was “If this piece of data will be used in multiple endpoints, then maybe we should put into the header.” That sounded at first a compelling argument, but since this was not the first time such discussion came up, I thought it was worth investigating further and writing about it.

HTTP Specification

First of all, let’s check out what the HTTP protocol says about headers and body.

Headers

After reading through the header’s section, I found…

Codeal

All about backend development. 🇧🇷 Versão brasileira https://codealbr.medium.com/

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store