Update the Main.
This commit is contained in:
@@ -4,14 +4,22 @@ import space.kklochko.jdbc_hospital_example.cli.CLI;
|
||||
import space.kklochko.jdbc_hospital_example.config.factories.LoadDataBaseConfigFromEnvFile;
|
||||
import space.kklochko.jdbc_hospital_example.config.models.DataBaseConfig;
|
||||
import space.kklochko.jdbc_hospital_example.db.factories.DataBaseConnection;
|
||||
import space.kklochko.jdbc_hospital_example.db.repositories.blocks.CreateTables;
|
||||
import space.kklochko.jdbc_hospital_example.db.repositories.blocks.TurnOnUUIDPlugin;
|
||||
|
||||
import java.sql.*;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) throws SQLException {
|
||||
public static void main(String[] args) {
|
||||
DataBaseConfig db = (new LoadDataBaseConfigFromEnvFile()).load();
|
||||
DataBaseConnection dbc = new DataBaseConnection(db);
|
||||
|
||||
TurnOnUUIDPlugin turnOnUUIDPlugin = new TurnOnUUIDPlugin();
|
||||
turnOnUUIDPlugin.create(dbc);
|
||||
|
||||
CreateTables createTables = new CreateTables();
|
||||
createTables.create(dbc);
|
||||
|
||||
CLI cli = new CLI(dbc);
|
||||
cli.run();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user