public static DataSource getDataSource ( final String dataSourceClassName , final Map < String , Object > dataSourceProperties ) throws ReflectiveOperationException { DataSource result = ( DataSource ) Class . forName ( dataSourceClassName ) . newInstance ( ) ; for ( Entry < String , Object > entry : dataSourceProperties . entrySet ( ) ) { callSetterMethod ( result , getSetterMethodName ( entry . getKey ( ) ) , null == entry . getValue ( ) ? null : entry . getValue ( ) . toString ( ) ) ; } return result ; }
Get data source .