Annotation Type EmbeddedDatabaseConfiguration
-
@Target(TYPE) @Retention(RUNTIME) @Documented @Inherited public @interface EmbeddedDatabaseConfiguration
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description booleancontinueOnErrorSpecify that all failures which occur while executing SQL scripts should be logged but should not cause a failure, defaults tofalse.StringdatabaseNameSet the name of the embedded database.org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseTypedatabaseTypeSet the type of embedded database.booleandefaultScriptsAdd default SQL scripts to execute to populate the database.booleangenerateUniqueNameSpecify whether a unique identifier should be generated and used as the database name.booleanignoreFailedDropsSpecify that a failed SQLDROPstatement within an executed scripts can be ignored.String[]scriptsAdd SQL scripts to execute to initialize or populate the database.
-
-
-
Element Detail
-
generateUniqueName
boolean generateUniqueName
Specify whether a unique identifier should be generated and used as the database name.- Returns:
trueto automatically generate a unique database name,falseotherwise.- See Also:
EmbeddedDatabaseBuilder.generateUniqueName(boolean)
- Default:
- false
-
-
-
databaseName
String databaseName
Set the name of the embedded database. Defaults to springEmbeddedDatabaseFactory.DEFAULT_DATABASE_NAME.- Returns:
- The database name.
- See Also:
EmbeddedDatabaseBuilder.setName(String)
- Default:
- "testdb"
-
-
-
databaseType
org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType databaseType
Set the type of embedded database. Use the same defaults as spring:EmbeddedDatabaseType.HSQL.- Returns:
- The
EmbeddedDatabaseTypeto use. - See Also:
EmbeddedDatabaseBuilder.setType(EmbeddedDatabaseType)
- Default:
- org.springframework.jdbc.datasource.embedded.EmbeddedDatabaseType.HSQL
-
-
-
scripts
String[] scripts
Add SQL scripts to execute to initialize or populate the database.- Returns:
- All the SQL scripts to execute.
- See Also:
EmbeddedDatabaseBuilder.addScript(String),EmbeddedDatabaseBuilder.addScripts(String...)
- Default:
- {}
-
-
-
continueOnError
boolean continueOnError
Specify that all failures which occur while executing SQL scripts should be logged but should not cause a failure, defaults tofalse.- Returns:
trueto continue in case of errors,falseotherwise.- See Also:
EmbeddedDatabaseBuilder.continueOnError(boolean)
- Default:
- false
-
-
-
ignoreFailedDrops
boolean ignoreFailedDrops
Specify that a failed SQLDROPstatement within an executed scripts can be ignored. This is useful for a database whose SQL dialect does not support anIF EXISTSclause in aDROPstatement. The default isfalse- Returns:
trueif errors inDROPstatement should be ignored,falseotherwise.- See Also:
EmbeddedDatabaseBuilder.ignoreFailedDrops(boolean)
- Default:
- false
-
-