You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: org.springframework.jdbc/src/main/java/org/springframework/jdbc/datasource/embedded/ResourceDatabasePopulator.java
+10-1
Original file line number
Diff line number
Diff line change
@@ -21,6 +21,7 @@
21
21
importjava.sql.SQLException;
22
22
importjava.sql.Statement;
23
23
importjava.util.ArrayList;
24
+
importjava.util.Arrays;
24
25
importjava.util.LinkedList;
25
26
importjava.util.List;
26
27
@@ -52,6 +53,14 @@ public void addScript(Resource script) {
52
53
scripts.add(script);
53
54
}
54
55
56
+
/**
57
+
* Set the scripts to execute to populate the database.
58
+
* @param scripts the scripts to execute
59
+
*/
60
+
publicvoidsetScripts(Resource[] scripts) {
61
+
this.scripts = Arrays.asList(scripts);
62
+
}
63
+
55
64
/**
56
65
* Specify the encoding for SQL scripts, if different from the platform encoding.
57
66
* Note setting this property has no effect on added scripts that are already {@link EncodedResource encoded resources}.
@@ -60,7 +69,7 @@ public void addScript(Resource script) {
Copy file name to clipboardExpand all lines: org.springframework.jdbc/src/test/java/org/springframework/jdbc/datasource/embedded/EmbeddedDatabaseFactoryBeanTests.java
0 commit comments