forked from softeerbootcamp-7th/be-was
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDatabaseConfig.java
More file actions
28 lines (21 loc) · 798 Bytes
/
DatabaseConfig.java
File metadata and controls
28 lines (21 loc) · 798 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package config;
import app.model.User;
import java.util.List;
public class DatabaseConfig {
private final AppConfig appConfig = new AppConfig();
public static final List<Class<?>> ENTITY_CLASSES = List.of(
User.class
);
public static final List<String> RESOLVED_WORD = List.of(
"user"
);
public static final String H2_DB_URL = "jdbc:h2:tcp://localhost//Users/apple/h2/testdb";
public static final String H2_DB_USER = "sa";
public static final String H2_DB_PASSWORD = "";
public static final boolean CREATE_TABLES = false;
public static final boolean DROP_IF_EXISTS = false;
public void config(){
DdlGenerator ddlGenerator = appConfig.ddlGenerator();
if(CREATE_TABLES) ddlGenerator.generateTables();
}
}