parent
8d4498ef6c
commit
20f1c0ef0e
|
@ -33,8 +33,7 @@ class ConfigDataNotFoundFailureAnalyzer extends AbstractFailureAnalyzer<ConfigDa
|
|||
protected FailureAnalysis analyze(Throwable rootFailure, ConfigDataNotFoundException cause) {
|
||||
ConfigDataLocation location = getLocation(cause);
|
||||
Origin origin = Origin.from(location);
|
||||
StringBuilder message = new StringBuilder(
|
||||
String.format("Config data %s does not exist", cause.getReferenceDescription()));
|
||||
String message = String.format("Config data %s does not exist", cause.getReferenceDescription());
|
||||
StringBuilder action = new StringBuilder("Check that the value ");
|
||||
if (location != null) {
|
||||
action.append(String.format("'%s' ", location));
|
||||
|
@ -46,7 +45,7 @@ class ConfigDataNotFoundFailureAnalyzer extends AbstractFailureAnalyzer<ConfigDa
|
|||
if (location != null && !location.isOptional()) {
|
||||
action.append(String.format(", or prefix it with '%s'", ConfigDataLocation.OPTIONAL_PREFIX));
|
||||
}
|
||||
return new FailureAnalysis(message.toString(), action.toString(), cause);
|
||||
return new FailureAnalysis(message, action.toString(), cause);
|
||||
}
|
||||
|
||||
private ConfigDataLocation getLocation(ConfigDataNotFoundException cause) {
|
||||
|
|
|
@ -71,6 +71,7 @@ public enum EmbeddedDatabaseConnection {
|
|||
|
||||
/**
|
||||
* HSQL Database Connection.
|
||||
* @since 2.4.0
|
||||
*/
|
||||
HSQLDB(EmbeddedDatabaseType.HSQL, DatabaseDriver.HSQLDB.getDriverClassName(), "org.hsqldb.jdbcDriver",
|
||||
"jdbc:hsqldb:mem:%s", (url) -> url.contains(":hsqldb:mem:"));
|
||||
|
|
|
@ -287,7 +287,7 @@ public class UndertowServletWebServerFactory extends AbstractServletWebServerFac
|
|||
}
|
||||
|
||||
/**
|
||||
* Return where the request path should be preserved on forward.
|
||||
* Return whether the request path should be preserved on forward.
|
||||
* @return {@code true} if the path should be preserved when a request is forwarded,
|
||||
* otherwise {@code false}.
|
||||
* @since 2.4.0
|
||||
|
|
|
@ -24,7 +24,7 @@ import org.springframework.boot.origin.Origin;
|
|||
import static org.assertj.core.api.Assertions.assertThat;
|
||||
|
||||
/**
|
||||
* Tests for {@link ConfigDataNotFoundFailureAnalyzer}
|
||||
* Tests for {@link ConfigDataNotFoundFailureAnalyzer}.
|
||||
*
|
||||
* @author Michal Mlak
|
||||
* @author Phillip Webb
|
||||
|
|
Loading…
Reference in New Issue