Posts

How to use dev services in SpringBoot, almost like Quarkus

When I started a projet on Quarkus, one of the big feature for me with this framework was the dev services. When you add a dependency (extension) like a database on your projet, it comes with a service that will manage automatically the start/stop of a container along with your application in development mode. You also have configuration parameters to set it the way you want, it is truly great !

When I started a new project on SpringBoot, I searched a way to have my local environment running in a way like the dev services of Quarkus. I found that since SpringBoot 3.1, you can have a test class to start containers along with your application, and thus with only one class start your complete environment. So easy !

Lire la suite →
Posts

Feedback from 2023 conferences : ADR and Copilot

This year I had the opportunity to attend two conferences: the Breizhcamp in Rennes and the DevFest Perros-Guirec. Among all the interesting conferences I attended, I wanted to share my thoughts on one conference per event, those that interested me the most.

Breizhcamp - Setting up an ADR

For some time now, I have read articles about how to track architectural decisions for software. The subject strongly interested me because I saw a major advantage (or complementary) compared to traditional technical specifications: it allows you to put context back into decision-making.

Lire la suite →
Posts

Migrating from SpringBoot 1.5 to SpringBoot 2.5 with OpenRewrite

At Slickteam, we got an old project working with SpringBoot 1.5 running in production. When I checked if we had security issues with this technical stack, I noticed that the version of SpringBoot we used hadn’t been maintained for a few years, there also are some CVEs that will never be corrected. So I planned to migrate the application to SpringBoot 2.5, up to date with all security fixes.

Therefore, I searched how I could do it, and after few articles I discovered OpenRewrite, a project that could help doing migrations. I decided to take a good look at it, and to try it for my migration.

Lire la suite →
Posts

Manage tests and coverage in Gitlab-CI

When you have a CI, you want it to run your tests and show the test results, and what failed if that’s the case. At Slickteam our CI runs on Gitlab-CI, and we manage our tests with it. It helps us to find more easily what has failed with the integration inside Gitlab UI. We also have displayed the global coverage result for all our tests.

Here is how we do it.

Lire la suite →
Posts

Integration testing with MongoDB on Gitlab-CI

At Slickteam our CI-CD platform works with Gitlab-CI, and works well! We are grasping more and more capabilities of the CI project after project, and we want to do things in the best possible way. For one of my project I had written integration tests with the database, and I wanted them to be run automatically on the CI pipeline.

To be able to do this, I have read and tested many things. For my test I need to have a database initialized with empty collections, and a user with read-write access to the database.

Lire la suite →
Posts

KTOR and Keycloak - authentication with OpenId

For some time I wanted to try Kotlin, and when I saw that Jetbrains announced the framework KTOR for web applications, it seems to me like a good opportunity to learn more about the language and to discover this new framework.

KTOR is a web framework for building web services or applications entirely in Kotlin, since you can generate HTML or CSS files in Kotlin with DSLs

(Domain-Specific Language). At the end oh this article there is an example of an HTML page written with the Kotlin HTML DSL. It embeds a web server (which you can choose between jetty, netty, tomcat or others), and you can configure it directly in your application’s code. Since it is edited by Jetbrains (creator of the Kotlin language), it seemed pretty interesting to me.

Lire la suite →