diff --git a/spring-framework-reference/src/jdbc.xml b/spring-framework-reference/src/jdbc.xml
index 01a2bce21e9..bb0e78838cc 100644
--- a/spring-framework-reference/src/jdbc.xml
+++ b/spring-framework-reference/src/jdbc.xml
@@ -2779,7 +2779,7 @@ SqlTypeValue value = new AbstractSqlTypeValue() {
this when you need to create an embedded database instance in a
standalone environment, such as a data access object unit test:
EmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();
- EmbeddedDatabase db = builder.type(H2).script("schema.sql").script("test-data.sql").build();
+ EmbeddedDatabase db = builder.setType(H2).addScript("my-schema.sql").addScript("my-test-data.sql").build();
// do stuff against the db (EmbeddedDatabase extends javax.sql.DataSource)
db.shutdown()
@@ -2812,12 +2812,11 @@ SqlTypeValue value = new AbstractSqlTypeValue() {
Using HSQL
Spring supports HSQL 1.0.0 to 2.0.0. HSQL is the default embedded
- database if no type is specified explicitly. To specify HSQL explicitly,
- set
- the type attribute of the
+ database if no type is specified explicitly. To specify HSQL explicitly,
+ set the type attribute of the
embedded-database tag to HSQL. If
you are using the builder API, call the
- type(EmbeddedDatabaseType) method with
+ setType(EmbeddedDatabaseType) method with
EmbeddedDatabaseType.HSQL.
@@ -2828,7 +2827,7 @@ SqlTypeValue value = new AbstractSqlTypeValue() {
type attribute of the
embedded-database tag to H2. If
you are using the builder API, call the
- type(EmbeddedDatabaseType) method with
+ setType(EmbeddedDatabaseType) method with
EmbeddedDatabaseType.H2.
@@ -2839,7 +2838,7 @@ SqlTypeValue value = new AbstractSqlTypeValue() {
set the type attribute of the
embedded-database tag to Derby. If
using the builder API, call the
- type(EmbeddedDatabaseType) method with
+ setType(EmbeddedDatabaseType) method with
EmbeddedDatabaseType.Derby.
@@ -2856,8 +2855,8 @@ public class DataAccessUnitTestTemplate {
@Before
public void setUp() {
- // creates a HSQL in-memory db populated from classpath:schema.sql and classpath:test-data.sql
- db = EmbeddedDatabaseBuilder.buildDefault();
+ // creates a HSQL in-memory db populated from default scripts classpath:schema.sql and classpath:test-data.sql
+ db = new EmbeddedDatabaseBuilder().addDefaultScripts().build();
}
@Test