Categories
Kubernetes Spring

Remote debug a Spring Boot application in Kubernetes

Sometimes, debugging an application locally is insufficient to pinpoint the underlying issue. Additionally, there are times when the infrastructure limitations do not allow one to debug an application. In such scenarios, remote debugging is a reasonable approach. However, that requires some preparations. In this article, we cover how to remote debug a Spring Boot application […]

Categories
Spring

Disable Springdoc OpenAPI Swagger in production

Previously, we covered how to disable Swagger-ui in production using the SpringFox Swagger2 library. Unfortunately, that library is unmaintained and it is no longer possible to use it with the latest versions of Spring Boot. The best drop-in replacement option is the Springdoc-openapi library which we covered how to use in our Spring Boot Swagger […]

Categories
PostgreSQL Spring

PostgreSQL integration tests using Testcontainers

Running tests against a real database provides more confidence in comparison to an in-memory database such as H2. For that, the Testcontainers library is a wise choice as it provides an out-of-the-box solution to write and run integration tests against an actual database of your choice running in a Docker container. In this tutorial, we […]

Categories
Docker Spring

Build Docker images in Spring Boot 3

New versions of Spring Boot provide easy ways to build Docker images without using any third-party libraries or services such as Spotify Maven plugin or Jib. In this tutorial, we cover how to build Docker images in Spring Boot 3. The good old dockerfile approach The most common approach to building a Docker image is […]

Categories
Java Kotlin Spring

Spring Boot Swagger documentation using OpenAPI

Rich API documentation is a vital element of any successful project, especially if it has to be integrated by third parties. Unfortunately, Spring Boot does not have an out-of-the-box solution for Swagger documentation. So we must use a third-party library (Springdoc-openapi) for that purpose. In this article, we cover how to add Spring Boot Swagger […]

Categories
Kotlin Spring

Spring Boot Redis integration test with Testcontainers in Kotlin

Like any other external dependency, we can write integration tests using Testcontainers for a Spring Boot application. However, unfortunately, Testcontainers does not have any library for Redis, and using Kotlin makes it even trickier. In this article, we explore how to write Spring Boot Redis integration test with Testcontainers in Kotlin. Introduction There are two […]

Exit mobile version