Search in sources :

Example 1 with DatabaseConfig

use of tech.goodquestion.lembot.config.DatabaseConfig in project LemBot by Leminee.

the class DatabaseConnector method setupDataSource.

private static void setupDataSource() {
    DatabaseConfig config = Config.getInstance().getDatabaseConfig();
    dataSource = new MysqlConnectionPoolDataSource();
    dataSource.setURL(config.getUrl());
    dataSource.setUser(config.getUsername());
    dataSource.setPassword(config.getPassword());
}
Also used : MysqlConnectionPoolDataSource(com.mysql.cj.jdbc.MysqlConnectionPoolDataSource) DatabaseConfig(tech.goodquestion.lembot.config.DatabaseConfig)

Aggregations

MysqlConnectionPoolDataSource (com.mysql.cj.jdbc.MysqlConnectionPoolDataSource)1 DatabaseConfig (tech.goodquestion.lembot.config.DatabaseConfig)1