• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java DatabaseDataSourceConnectionFactoryBean类的典型用法和代码示例

java 8次浏览

本文整理汇总了Java中com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean的典型用法代码示例。如果您正苦于以下问题:Java DatabaseDataSourceConnectionFactoryBean类的具体用法?Java DatabaseDataSourceConnectionFactoryBean怎么用?Java DatabaseDataSourceConnectionFactoryBean使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。

DatabaseDataSourceConnectionFactoryBean类属于com.github.springtestdbunit.bean包,在下文中一共展示了DatabaseDataSourceConnectionFactoryBean类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: dbUnitDatabaseConnection

点赞 2

import com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean; //导入依赖的package包/类
/**
 * the connection factory - required since we have a custom H2 DB config in
 * {@link DaoDbUnitTestConfig#dbUnitDatabaseConfig()}
 */
@Bean
public DatabaseDataSourceConnectionFactoryBean dbUnitDatabaseConnection(DataSource dataSource) {
    DatabaseDataSourceConnectionFactoryBean bean = new DatabaseDataSourceConnectionFactoryBean();
    bean.setDataSource(dataSource);
    bean.setDatabaseConfig(dbUnitDatabaseConfig());

    return bean;
}
 

开发者ID:amvnetworks,
项目名称:amv-access-api-poc,
代码行数:13,
代码来源:DaoDbUnitTestConfig.java

示例2: dbUnitDatabaseConnection

点赞 2

import com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean; //导入依赖的package包/类
@Bean(name = "dbUnitDatabaseConnection")
public DatabaseDataSourceConnectionFactoryBean dbUnitDatabaseConnection() throws SQLException, DatabaseUnitException, IOException {
    DatabaseDataSourceConnectionFactoryBean databaseDataSourceConnectionFactoryBean = new DatabaseDataSourceConnectionFactoryBean();
    databaseDataSourceConnectionFactoryBean.setDatabaseConfig(databaseConfigBean());
    databaseDataSourceConnectionFactoryBean.setDataSource(dataSource);
    return databaseDataSourceConnectionFactoryBean;
}
 

开发者ID:thingsboard,
项目名称:thingsboard,
代码行数:8,
代码来源:JpaDbunitTestConfig.java

示例3: databaseDataSourceConnectionFactoryBean

点赞 2

import com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean; //导入依赖的package包/类
@Bean(name = "dbUnitDatabaseConnection")
public DatabaseDataSourceConnectionFactoryBean databaseDataSourceConnectionFactoryBean() {
  DatabaseDataSourceConnectionFactoryBean dsf = new DatabaseDataSourceConnectionFactoryBean();
  dsf.setDatabaseConfig(databaseConfigBean());
  dsf.setDataSource(dataSource);
  return dsf;
}
 

开发者ID:frank780117,
项目名称:dbunit-ext,
代码行数:8,
代码来源:TestApplication.java

示例4: testConnection

点赞 2

import com.github.springtestdbunit.bean.DatabaseDataSourceConnectionFactoryBean; //导入依赖的package包/类
@SuppressWarnings("ProhibitedExceptionDeclared")
@Bean
public DatabaseDataSourceConnection testConnection(final DataSource dataSource) throws Exception {
    final DatabaseConfigBean databaseConfigBean = new DatabaseConfigBean();
    databaseConfigBean.setDatatypeFactory(new H2DataTypeFactory());
    databaseConfigBean.setCaseSensitiveTableNames(false);

    final DatabaseDataSourceConnectionFactoryBean databaseDataSourceConnectionFactoryBean = new DatabaseDataSourceConnectionFactoryBean();
    databaseDataSourceConnectionFactoryBean.setDataSource(dataSource);
    databaseDataSourceConnectionFactoryBean.setDatabaseConfig(databaseConfigBean);
    databaseDataSourceConnectionFactoryBean.setSchema("FIND");

    return databaseDataSourceConnectionFactoryBean.getObject();
}
 

开发者ID:hpe-idol,
项目名称:find,
代码行数:15,
代码来源:SavedSearchTestConfiguration.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)