@@ -29,12 +29,13 @@ public class JdbcConfig {
29
29
private final Properties properties ;
30
30
private final String name ;
31
31
private final String generateDdl ;
32
-
32
+ private final String initializationFile ;
33
+
33
34
public JdbcConfig (@ Value ("${db.connection.driver:}" ) String driverClassName , @ Value ("${db.connection.url:}" ) String url ,
34
35
@ Value ("${db.connection.username:}" ) String username , @ Value ("${db.connection.password:}" ) String password ,
35
36
@ Value ("${db.connection.hibernate.showsql:false}" ) String showSql , @ Value ("${db.connection.dialect:}" ) String dialect ,
36
37
@ Value ("${db.connection.ddl.auto:#{null}}" ) String ddlAuto ) {
37
- this (driverClassName , url , username , password , showSql , dialect , ddlAuto , new Properties (), "db" , "false" );
38
+ this (driverClassName , url , username , password , showSql , dialect , ddlAuto , new Properties (), "db" , "false" , null );
38
39
39
40
}
40
41
@@ -43,7 +44,8 @@ public JdbcConfig(@Value("${db.connection.driver:}") String driverClassName, @Va
43
44
@ Value ("${db.connection.username:}" ) String username , @ Value ("${db.connection.password:}" ) String password ,
44
45
@ Value ("${db.connection.hibernate.showsql:false}" ) String showSql , @ Value ("${db.connection.dialect:}" ) String dialect ,
45
46
@ Value ("${db.connection.ddl.auto:#{null}}" ) String ddlAuto , @ Qualifier ("propertyFactory" ) Properties properties ,
46
- @ Value ("${internal.not.use.microserver:#{null}}" ) String name , @ Value ("${db.connection.generate.ddl:false}" ) String generateDdl ) {
47
+ @ Value ("${internal.not.use.microserver:#{null}}" ) String name , @ Value ("${db.connection.generate.ddl:false}" ) String generateDdl ,
48
+ @ Value ("${db.connection.ddl.init:#{null}}" ) String initializationFile ) {
47
49
this .properties = properties ;
48
50
this .name = UsefulStaticMethods .either (name , new ConfigAccessor ().get ().getDefaultDataSourceName ());
49
51
this .driverClassName = UsefulStaticMethods .either (driverClassName , extract ("connection.driver" ));
@@ -53,7 +55,8 @@ public JdbcConfig(@Value("${db.connection.driver:}") String driverClassName, @Va
53
55
this .showSql = UsefulStaticMethods .either (showSql , extract ("connection.showsql" ));
54
56
this .dialect = UsefulStaticMethods .either (dialect , extract ("connection.dialect" ));
55
57
this .ddlAuto = UsefulStaticMethods .either (ddlAuto , extract ("connection.ddl.auto" ));
56
- this .generateDdl = UsefulStaticMethods .either (generateDdl , extract ("connection.generate.ddl" ));
58
+ this .generateDdl = UsefulStaticMethods .either (generateDdl , extract ("connection.generate.ddl" ));
59
+ this .initializationFile = initializationFile ;
57
60
}
58
61
59
62
private String extract (String suffix ) {
0 commit comments