当前位置: 首页>>代码示例>>Java>>正文


Java VendorDatabaseIdProvider类代码示例

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


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

示例1: afterPropertiesSet

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
@Override
public void afterPropertiesSet() throws Exception {

    DatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider();
    Properties p = new Properties();
    p.setProperty("SQL Server", "sqlserver");
    p.setProperty("Oracle", "oracle");
    p.setProperty("DB2", "db2");
    p.setProperty("MySQL", "mysql");
    p.setProperty("H2", "h2");
    p.setProperty("PostgreSQL", "postgres");
    databaseIdProvider.setProperties(p);
    setDatabaseIdProvider(databaseIdProvider);


    super.afterPropertiesSet();
}
 
开发者ID:hatunet,项目名称:spring-data-mybatis,代码行数:18,代码来源:SqlSessionFactoryBean.java

示例2: historySqlSessionFactory

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
@Bean
public static SqlSessionFactoryBean historySqlSessionFactory(DataSource historyDataSource) throws Exception {
  SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
  sessionFactory.setDataSource(historyDataSource);
  sessionFactory.setTypeHandlersPackage("cern.c2mon.server.history.mapper");

  VendorDatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider();
  Properties properties = new Properties();
  properties.putAll(ImmutableMap.of(
      "HSQL", "oracle",
      "Oracle", "oracle",
      "MySQL", "mysql"
  ));
  databaseIdProvider.setProperties(properties);

  sessionFactory.setDatabaseIdProvider(databaseIdProvider);
  return sessionFactory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:19,代码来源:HistoryDataSourceConfig.java

示例3: Configuration

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
public Configuration() {
  typeAliasRegistry.registerAlias("JDBC", JdbcTransactionFactory.class);
  typeAliasRegistry.registerAlias("MANAGED", ManagedTransactionFactory.class);

  typeAliasRegistry.registerAlias("JNDI", JndiDataSourceFactory.class);
  typeAliasRegistry.registerAlias("POOLED", PooledDataSourceFactory.class);
  typeAliasRegistry.registerAlias("UNPOOLED", UnpooledDataSourceFactory.class);

  typeAliasRegistry.registerAlias("PERPETUAL", PerpetualCache.class);
  typeAliasRegistry.registerAlias("FIFO", FifoCache.class);
  typeAliasRegistry.registerAlias("LRU", LruCache.class);
  typeAliasRegistry.registerAlias("SOFT", SoftCache.class);
  typeAliasRegistry.registerAlias("WEAK", WeakCache.class);

  typeAliasRegistry.registerAlias("DB_VENDOR", VendorDatabaseIdProvider.class);

  typeAliasRegistry.registerAlias("XML", XMLLanguageDriver.class);
  typeAliasRegistry.registerAlias("RAW", RawLanguageDriver.class);

  typeAliasRegistry.registerAlias("SLF4J", Slf4jImpl.class);
  typeAliasRegistry.registerAlias("COMMONS_LOGGING", JakartaCommonsLoggingImpl.class);
  typeAliasRegistry.registerAlias("LOG4J", Log4jImpl.class);
  typeAliasRegistry.registerAlias("LOG4J2", Log4j2Impl.class);
  typeAliasRegistry.registerAlias("JDK_LOGGING", Jdk14LoggingImpl.class);
  typeAliasRegistry.registerAlias("STDOUT_LOGGING", StdOutImpl.class);
  typeAliasRegistry.registerAlias("NO_LOGGING", NoLoggingImpl.class);

  typeAliasRegistry.registerAlias("CGLIB", CglibProxyFactory.class);
  typeAliasRegistry.registerAlias("JAVASSIST", JavassistProxyFactory.class);

  languageRegistry.setDefaultDriverClass(XMLLanguageDriver.class);
  languageRegistry.register(RawLanguageDriver.class);
}
 
开发者ID:yuexiahandao,项目名称:MybatisCode,代码行数:34,代码来源:Configuration.java

示例4: Configuration

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
public Configuration() {
  // 源码解析: 注册事务工厂别名
  typeAliasRegistry.registerAlias("JDBC", JdbcTransactionFactory.class);
  typeAliasRegistry.registerAlias("MANAGED", ManagedTransactionFactory.class);

  // 源码解析: 注册数据源工厂别名
  typeAliasRegistry.registerAlias("JNDI", JndiDataSourceFactory.class);
  typeAliasRegistry.registerAlias("POOLED", PooledDataSourceFactory.class);
  typeAliasRegistry.registerAlias("UNPOOLED", UnpooledDataSourceFactory.class);

  // 源码解析: 注册缓存别名
  typeAliasRegistry.registerAlias("PERPETUAL", PerpetualCache.class);
  typeAliasRegistry.registerAlias("FIFO", FifoCache.class);
  typeAliasRegistry.registerAlias("LRU", LruCache.class);
  typeAliasRegistry.registerAlias("SOFT", SoftCache.class);
  typeAliasRegistry.registerAlias("WEAK", WeakCache.class);

  // 源码解析: 注册VendorDatabaseIdProvider别名
  typeAliasRegistry.registerAlias("DB_VENDOR", VendorDatabaseIdProvider.class);

  // 源码解析: 注册LanguageDriver别名
  typeAliasRegistry.registerAlias("XML", XMLLanguageDriver.class);
  typeAliasRegistry.registerAlias("RAW", RawLanguageDriver.class);

  // 源码解析: 注册日志实现别名
  typeAliasRegistry.registerAlias("SLF4J", Slf4jImpl.class);
  typeAliasRegistry.registerAlias("COMMONS_LOGGING", JakartaCommonsLoggingImpl.class);
  typeAliasRegistry.registerAlias("LOG4J", Log4jImpl.class);
  typeAliasRegistry.registerAlias("LOG4J2", Log4j2Impl.class);
  typeAliasRegistry.registerAlias("JDK_LOGGING", Jdk14LoggingImpl.class);
  typeAliasRegistry.registerAlias("STDOUT_LOGGING", StdOutImpl.class);
  typeAliasRegistry.registerAlias("NO_LOGGING", NoLoggingImpl.class);

  // 源码解析: 注册代理工厂别名
  typeAliasRegistry.registerAlias("CGLIB", CglibProxyFactory.class);
  typeAliasRegistry.registerAlias("JAVASSIST", JavassistProxyFactory.class);

  languageRegistry.setDefaultDriverClass(XMLLanguageDriver.class);
  languageRegistry.register(RawLanguageDriver.class);
}
 
开发者ID:txazo,项目名称:mybatis,代码行数:41,代码来源:Configuration.java

示例5: Configuration

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
public Configuration() {
	typeAliasRegistry.registerAlias("JDBC", JdbcTransactionFactory.class);
	typeAliasRegistry.registerAlias("MANAGED",
			ManagedTransactionFactory.class);

	typeAliasRegistry.registerAlias("JNDI", JndiDataSourceFactory.class);
	typeAliasRegistry
			.registerAlias("POOLED", PooledDataSourceFactory.class);
	typeAliasRegistry.registerAlias("UNPOOLED",
			UnpooledDataSourceFactory.class);

	typeAliasRegistry.registerAlias("PERPETUAL", PerpetualCache.class);
	typeAliasRegistry.registerAlias("FIFO", FifoCache.class);
	typeAliasRegistry.registerAlias("LRU", LruCache.class);
	typeAliasRegistry.registerAlias("SOFT", SoftCache.class);
	typeAliasRegistry.registerAlias("WEAK", WeakCache.class);

	typeAliasRegistry.registerAlias("DB_VENDOR",
			VendorDatabaseIdProvider.class);

	typeAliasRegistry.registerAlias("XML", XMLLanguageDriver.class);
	typeAliasRegistry.registerAlias("RAW", RawLanguageDriver.class);

	typeAliasRegistry.registerAlias("SLF4J", Slf4jImpl.class);
	typeAliasRegistry.registerAlias("COMMONS_LOGGING",
			JakartaCommonsLoggingImpl.class);
	typeAliasRegistry.registerAlias("LOG4J", Log4jImpl.class);
	typeAliasRegistry.registerAlias("LOG4J2", Log4j2Impl.class);
	typeAliasRegistry.registerAlias("JDK_LOGGING", Jdk14LoggingImpl.class);
	typeAliasRegistry.registerAlias("STDOUT_LOGGING", StdOutImpl.class);
	typeAliasRegistry.registerAlias("NO_LOGGING", NoLoggingImpl.class);

	typeAliasRegistry.registerAlias("CGLIB", CglibProxyFactory.class);
	typeAliasRegistry.registerAlias("JAVASSIST",
			JavassistProxyFactory.class);

	languageRegistry.setDefaultDriverClass(XMLLanguageDriver.class);
	languageRegistry.register(RawLanguageDriver.class);
}
 
开发者ID:EleTeam,项目名称:Shop-for-JavaWeb,代码行数:40,代码来源:Configuration.java

示例6: configSqlSessionFactory

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
@Bean
public static SqlSessionFactoryBean configSqlSessionFactory(DataSource configurationDataSource,
                                                            VendorDatabaseIdProvider databaseIdProvider) throws Exception {
  SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
  sessionFactory.setDataSource(configurationDataSource);
  sessionFactory.setTypeHandlersPackage("cern.c2mon.server.configuration.mybatis");
  sessionFactory.setDatabaseIdProvider(databaseIdProvider);
  return sessionFactory;
}
 
开发者ID:c2mon,项目名称:c2mon,代码行数:10,代码来源:ConfigDataSourceConfig.java

示例7: Configuration

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
public Configuration() {
	typeAliasRegistry.registerAlias("JDBC", JdbcTransactionFactory.class);
	typeAliasRegistry.registerAlias("MANAGED", ManagedTransactionFactory.class);

	typeAliasRegistry.registerAlias("JNDI", JndiDataSourceFactory.class);
	typeAliasRegistry.registerAlias("POOLED", PooledDataSourceFactory.class);
	typeAliasRegistry.registerAlias("UNPOOLED", UnpooledDataSourceFactory.class);

	typeAliasRegistry.registerAlias("PERPETUAL", PerpetualCache.class);
	typeAliasRegistry.registerAlias("FIFO", FifoCache.class);
	typeAliasRegistry.registerAlias("LRU", LruCache.class);
	typeAliasRegistry.registerAlias("SOFT", SoftCache.class);
	typeAliasRegistry.registerAlias("WEAK", WeakCache.class);

	typeAliasRegistry.registerAlias("DB_VENDOR", VendorDatabaseIdProvider.class);

	typeAliasRegistry.registerAlias("XML", XMLLanguageDriver.class);
	typeAliasRegistry.registerAlias("RAW", RawLanguageDriver.class);

	typeAliasRegistry.registerAlias("SLF4J", Slf4jImpl.class);
	typeAliasRegistry.registerAlias("COMMONS_LOGGING", JakartaCommonsLoggingImpl.class);
	typeAliasRegistry.registerAlias("LOG4J", Log4jImpl.class);
	typeAliasRegistry.registerAlias("LOG4J2", Log4j2Impl.class);
	typeAliasRegistry.registerAlias("JDK_LOGGING", Jdk14LoggingImpl.class);
	typeAliasRegistry.registerAlias("STDOUT_LOGGING", StdOutImpl.class);
	typeAliasRegistry.registerAlias("NO_LOGGING", NoLoggingImpl.class);

	typeAliasRegistry.registerAlias("CGLIB", CglibProxyFactory.class);
	typeAliasRegistry.registerAlias("JAVASSIST", JavassistProxyFactory.class);

	languageRegistry.setDefaultDriverClass(XMLLanguageDriver.class);
	languageRegistry.register(RawLanguageDriver.class);
}
 
开发者ID:whatlookingfor,项目名称:spring-boot-sample,代码行数:34,代码来源:Configuration.java

示例8: Configuration

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
public Configuration() {
  //注册更多的类型别名,至于为何不直接在TypeAliasRegistry里注册,还需进一步研究
  typeAliasRegistry.registerAlias("JDBC", JdbcTransactionFactory.class);
  typeAliasRegistry.registerAlias("MANAGED", ManagedTransactionFactory.class);

  typeAliasRegistry.registerAlias("JNDI", JndiDataSourceFactory.class);
  typeAliasRegistry.registerAlias("POOLED", PooledDataSourceFactory.class);
  typeAliasRegistry.registerAlias("UNPOOLED", UnpooledDataSourceFactory.class);

  typeAliasRegistry.registerAlias("PERPETUAL", PerpetualCache.class);
  typeAliasRegistry.registerAlias("FIFO", FifoCache.class);
  typeAliasRegistry.registerAlias("LRU", LruCache.class);
  typeAliasRegistry.registerAlias("SOFT", SoftCache.class);
  typeAliasRegistry.registerAlias("WEAK", WeakCache.class);

  typeAliasRegistry.registerAlias("DB_VENDOR", VendorDatabaseIdProvider.class);

  typeAliasRegistry.registerAlias("XML", XMLLanguageDriver.class);
  typeAliasRegistry.registerAlias("RAW", RawLanguageDriver.class);

  typeAliasRegistry.registerAlias("SLF4J", Slf4jImpl.class);
  typeAliasRegistry.registerAlias("COMMONS_LOGGING", JakartaCommonsLoggingImpl.class);
  typeAliasRegistry.registerAlias("LOG4J", Log4jImpl.class);
  typeAliasRegistry.registerAlias("LOG4J2", Log4j2Impl.class);
  typeAliasRegistry.registerAlias("JDK_LOGGING", Jdk14LoggingImpl.class);
  typeAliasRegistry.registerAlias("STDOUT_LOGGING", StdOutImpl.class);
  typeAliasRegistry.registerAlias("NO_LOGGING", NoLoggingImpl.class);

  typeAliasRegistry.registerAlias("CGLIB", CglibProxyFactory.class);
  typeAliasRegistry.registerAlias("JAVASSIST", JavassistProxyFactory.class);

  languageRegistry.setDefaultDriverClass(XMLLanguageDriver.class);
  languageRegistry.register(RawLanguageDriver.class);
}
 
开发者ID:shurun19851206,项目名称:mybaties,代码行数:35,代码来源:Configuration.java

示例9: sqlSessionFactory

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
@Bean
@ConditionalOnMissingBean
public SqlSessionFactory sqlSessionFactory() throws Exception {
    SqlSessionFactoryBean factory = new SqlSessionFactoryBean();
    factory.setDataSource(dataSource());
    factory.setDatabaseIdProvider(new VendorDatabaseIdProvider());
    if (StringUtils.hasText(this.mybatisResolver.getProperty("config"))) {
        factory.setConfigLocation(
                this.resourceLoader.getResource(this.mybatisResolver.getProperty("config")));
    }
    return factory.getObject();
}
 
开发者ID:cnmydida,项目名称:pandapay,代码行数:13,代码来源:DataBaseConfiguration.java

示例10: Configuration

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
public Configuration() {
//事务类型
  typeAliasRegistry.registerAlias("JDBC", JdbcTransactionFactory.class);
  typeAliasRegistry.registerAlias("MANAGED", ManagedTransactionFactory.class);
  //数据源与连接池类型
  typeAliasRegistry.registerAlias("JNDI", JndiDataSourceFactory.class);
  typeAliasRegistry.registerAlias("POOLED", PooledDataSourceFactory.class);
  typeAliasRegistry.registerAlias("UNPOOLED", UnpooledDataSourceFactory.class);

  typeAliasRegistry.registerAlias("PERPETUAL", PerpetualCache.class);
  typeAliasRegistry.registerAlias("FIFO", FifoCache.class);
  typeAliasRegistry.registerAlias("LRU", LruCache.class);
  typeAliasRegistry.registerAlias("SOFT", SoftCache.class);
  typeAliasRegistry.registerAlias("WEAK", WeakCache.class);

  typeAliasRegistry.registerAlias("DB_VENDOR", VendorDatabaseIdProvider.class);

  typeAliasRegistry.registerAlias("XML", XMLLanguageDriver.class);
  typeAliasRegistry.registerAlias("RAW", RawLanguageDriver.class);

  typeAliasRegistry.registerAlias("SLF4J", Slf4jImpl.class);
  typeAliasRegistry.registerAlias("COMMONS_LOGGING", JakartaCommonsLoggingImpl.class);
  typeAliasRegistry.registerAlias("LOG4J", Log4jImpl.class);
  typeAliasRegistry.registerAlias("LOG4J2", Log4j2Impl.class);
  typeAliasRegistry.registerAlias("JDK_LOGGING", Jdk14LoggingImpl.class);
  typeAliasRegistry.registerAlias("STDOUT_LOGGING", StdOutImpl.class);
  typeAliasRegistry.registerAlias("NO_LOGGING", NoLoggingImpl.class);

  typeAliasRegistry.registerAlias("CGLIB", CglibProxyFactory.class);
  typeAliasRegistry.registerAlias("JAVASSIST", JavassistProxyFactory.class);

  languageRegistry.setDefaultDriverClass(XMLLanguageDriver.class);
  languageRegistry.register(RawLanguageDriver.class);
}
 
开发者ID:toulezu,项目名称:play,代码行数:35,代码来源:Configuration.java

示例11: vendorDatabaseIdProvider

import org.apache.ibatis.mapping.VendorDatabaseIdProvider; //导入依赖的package包/类
@Bean
public VendorDatabaseIdProvider vendorDatabaseIdProvider(Properties vendorProperties) {
	VendorDatabaseIdProvider databaseIdProvider = new VendorDatabaseIdProvider();
	databaseIdProvider.setProperties(vendorProperties);
	return databaseIdProvider;
}
 
开发者ID:mybatis,项目名称:spring-boot-starter,代码行数:7,代码来源:MybatisAutoConfigurationTest.java


注:本文中的org.apache.ibatis.mapping.VendorDatabaseIdProvider类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。