diff --git a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java index 869cc25f3f..dd263aebba 100644 --- a/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java +++ b/spring-boot-autoconfigure/src/test/java/org/springframework/boot/autoconfigure/jdbc/DataSourceAutoConfigurationTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2014 the original author or authors. + * Copyright 2012-2016 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -85,7 +85,7 @@ public class DataSourceAutoConfigurationTests { } @Test - public void testDataSourceUrlHasEmbeddedDefault() throws Exception { + public void testDataSourceHasEmbeddedDefault() throws Exception { this.context.register(DataSourceAutoConfiguration.class, PropertyPlaceholderAutoConfiguration.class); this.context.refresh(); diff --git a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc index 54b2a2ba3c..06a723e83b 100644 --- a/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc +++ b/spring-boot-docs/src/main/asciidoc/spring-boot-features.adoc @@ -2268,6 +2268,10 @@ For example, typical POM dependencies would be: ---- +NOTE: You need a dependency on `spring-jdbc` for an embedded database to be +auto-configured. In this example it's pulled in transitively via +`spring-boot-starter-data-jpa`. + TIP: If, for whatever reason, you do configure the connection URL for an embedded database, care should be taken to ensure that the database’s automatic shutdown is disabled. If you're using H2 you should use `DB_CLOSE_ON_EXIT=FALSE` to do so. If you're @@ -2275,10 +2279,6 @@ using HSQLDB, you should ensure that `shutdown=true` is not used. Disabling the automatic shutdown allows Spring Boot to control when the database is closed, thereby ensuring that it happens once access to the database is no longer needed. -NOTE: You need a dependency on `spring-jdbc` for an embedded database to be -auto-configured. In this example it's pulled in transitively via -`spring-boot-starter-data-jpa`. - [[boot-features-connect-to-production-database]]