DB Integration Tests with Spring Boot and Testcontainers 1. Overview Spring Data JPA provides an easy way to create database queries and test them with an embedded H2 database. But in some cases, testing on a real database is much more profitable, especially if we use provider-dependent queries. In this tutorial,… Continue Reading spring-boot-testcontainers-integration-test

Display Auto-Configuration Report in Spring Boot 1. Overview The auto-configuration mechanism in Spring Boot attempts to automatically configure an application based on its dependencies. In this quick tutorial, we’ll see how Spring Boot can log its auto-configuration report at startup time. 2. Sample Application Let’s write a simple Spring Boot… Continue Reading spring-boot-auto-configuration-report

Exclude Auto-Configuration Classes in Spring Boot Tests 1. Overview In this quick tutorial, we’ll discuss how to exclude auto-configuration classes from Spring Boot tests. Spring Boot’s auto-configuration feature is very handy, as it takes care of a lot of setup for us. However, this can also be an issue during… Continue Reading spring-boot-exclude-auto-configuration-test

A Quick Intro to the SpringBootServletInitializer 1. Overview In this tutorial, we’ll go through a quick introduction of the SpringBootServletInitializer. This is an extension of WebApplicationInitializer which runs a SpringApplication from a traditional WAR archive deployed on a web container. This class binds Servlet, Filter and ServletContextInitializer beans from the… Continue Reading spring-boot-servlet-initializer

How to Disable Console Logging in Spring Boot 1. Overview Usually, console logs give us the opportunity to debug our system in an easy and intuitive way. Nevertheless, there are occasions when we don’t want to enable this feature in our system. In this quick tutorial, we’ll see how to… Continue Reading spring-boot-disable-console-logging

HTTPS using Self-Signed Certificate in Spring Boot 1. Overview In this tutorial, we’re going to illustrate step by step an example of enabling HTTPS in a Spring Boot application. We’ll generate a self-signed certificate and configure it in a sample app. For more details on Spring Boot projects, we can… Continue Reading spring-boot-https-self-signed-certificate