From 906a16514ae7cfbd7f82714eb19570e91948ef3a Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 19 Dec 2024 11:05:52 +0200 Subject: [PATCH 1/2] Added an action proposal relevant for increasingly popular Testcontainers projects --- .../jdbc/DataSourceBeanCreationFailureAnalyzer.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java index 4b271537ae5a..388f042531d5 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java @@ -66,6 +66,8 @@ private String getAction(DataSourceBeanCreationException cause) { StringBuilder action = new StringBuilder(); action.append(String.format("Consider the following:%n")); if (EmbeddedDatabaseConnection.NONE == cause.getConnection()) { + action.append(String + .format("\tIf you're using Testcontainers to set up your development datasource, consider starting the application from the test sources instead.%n")); action.append(String .format("\tIf you want an embedded database (H2, HSQL or Derby), please put it on the classpath.%n")); } From 94f2e249c6ec6064e2c0ba5c65ed6c24db4256f8 Mon Sep 17 00:00:00 2001 From: Matti Tahvonen Date: Thu, 19 Dec 2024 12:47:54 +0200 Subject: [PATCH 2/2] autoforma --- .../jdbc/DataSourceBeanCreationFailureAnalyzer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java index 388f042531d5..a9891b7da690 100644 --- a/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java +++ b/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/jdbc/DataSourceBeanCreationFailureAnalyzer.java @@ -66,8 +66,8 @@ private String getAction(DataSourceBeanCreationException cause) { StringBuilder action = new StringBuilder(); action.append(String.format("Consider the following:%n")); if (EmbeddedDatabaseConnection.NONE == cause.getConnection()) { - action.append(String - .format("\tIf you're using Testcontainers to set up your development datasource, consider starting the application from the test sources instead.%n")); + action.append(String.format( + "\tIf you're using Testcontainers to set up your development datasource, consider starting the application from the test sources instead.%n")); action.append(String .format("\tIf you want an embedded database (H2, HSQL or Derby), please put it on the classpath.%n")); }