@ SuppressWarnings ( "unchecked" ) public boolean connectJdbcOnWithUrlAndDriverAndUsernameAndPassword ( String dataBaseId , String url , String driverClassName , String username , String password ) throws ReflectiveOperationException { SimpleDriverDataSource dataSource = new SimpleDriverDataSource ( ) ; dataSource . setUrl ( url ) ; dataSource . setDriverClass ( ( Class < Driver > ) Class . forName ( driverClassName ) ) ; dataSource . setUsername ( username ) ; dataSource . setPassword ( password ) ; this . templateMap . put ( dataBaseId , new JdbcTemplate ( dataSource ) ) ; return true ; }
Registers a database to further execute SQL commands