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


Java DefaultConfiguration.set方法代码示例

本文整理汇总了Java中org.jooq.impl.DefaultConfiguration.set方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultConfiguration.set方法的具体用法?Java DefaultConfiguration.set怎么用?Java DefaultConfiguration.set使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jooq.impl.DefaultConfiguration的用法示例。


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

示例1: jooqConfiguration

import org.jooq.impl.DefaultConfiguration; //导入方法依赖的package包/类
@Bean
@ConditionalOnMissingBean(org.jooq.Configuration.class)
public DefaultConfiguration jooqConfiguration() {
	DefaultConfiguration configuration = new DefaultConfiguration();
	if (this.properties.getSqlDialect() != null) {
		configuration.set(this.properties.getSqlDialect());
	}
	configuration.set(this.connectionProvider);
	if (this.transactionProvider != null) {
		configuration.set(this.transactionProvider);
	}
	if (this.recordMapperProvider != null) {
		configuration.set(this.recordMapperProvider);
	}
	if (this.settings != null) {
		configuration.set(this.settings);
	}
	configuration.set(this.recordListenerProviders);
	configuration.set(this.executeListenerProviders);
	configuration.set(this.visitListenerProviders);
	return configuration;
}
 
开发者ID:vikrammane23,项目名称:https-github.com-g0t4-jenkins2-course-spring-boot,代码行数:23,代码来源:JooqAutoConfiguration.java

示例2: defaultConfigFromDataSource

import org.jooq.impl.DefaultConfiguration; //导入方法依赖的package包/类
public static DefaultConfiguration defaultConfigFromDataSource(DataSource ds) {
    DataSourceConnectionProvider dcp = new DataSourceConnectionProvider(ds);
    DefaultConfiguration jooqConfig = new DefaultConfiguration();
    jooqConfig.set(SQLDialect.MYSQL);
    jooqConfig.set(dcp);
    return jooqConfig;
}
 
开发者ID:StubbornJava,项目名称:StubbornJava,代码行数:8,代码来源:JooqConfig.java

示例3: config

import org.jooq.impl.DefaultConfiguration; //导入方法依赖的package包/类
@Bean
public DefaultConfiguration config() {
	LOG.info("JOOQ Config");
	DefaultConfiguration defaultConfiguration = new DefaultConfiguration();
	defaultConfiguration.set(connectionProvider());
	defaultConfiguration.set(SQLDialect.MYSQL);
	return defaultConfiguration;
}
 
开发者ID:szaqal,项目名称:KitchenSink,代码行数:9,代码来源:ApplicationConfiguration.java

示例4: configuration

import org.jooq.impl.DefaultConfiguration; //导入方法依赖的package包/类
@Bean(name="presets-jooq-configuration") @Inject
public DefaultConfiguration configuration(@Named("presets-connection-provider") DataSourceConnectionProvider provider) {
    DefaultConfiguration jooqConfiguration = new DefaultConfiguration();

    jooqConfiguration.set(provider);
//    jooqConfiguration.set(new DefaultExecuteListenerProvider(
//        jooqToSpringExceptionTransformer()
//    ));

    String sqlDialectName = environment.getProperty(MEV_PRESETS_PROPERTY_PREFIX+"jooq.sql.dialect");
    SQLDialect dialect = SQLDialect.valueOf(sqlDialectName);
    jooqConfiguration.set(dialect);

    return jooqConfiguration;
}
 
开发者ID:dfci-cccb,项目名称:mev,代码行数:16,代码来源:PresetPersistenceConfiguration.java

示例5: afterPropertiesSet

import org.jooq.impl.DefaultConfiguration; //导入方法依赖的package包/类
@Override
    public void afterPropertiesSet() throws Exception {
        com.angkorteam.mbaas.server.bean.Configuration xml = null;
        String configurationFile = this.servletContext.getInitParameter("configuration");
        File file;
        if (!Strings.isNullOrEmpty(configurationFile)) {
            file = new File(configurationFile);
        } else {
            File home = new File(java.lang.System.getProperty("user.home"));
            file = new File(home, ".xml/" + com.angkorteam.mbaas.server.bean.Configuration.KEY);
        }
        try {
            xml = new com.angkorteam.mbaas.server.bean.Configuration(file);
        } catch (ConfigurationException e) {
        }

        MappedSchema mappedSchema = new MappedSchema();
        mappedSchema.withInput(xml.getString(com.angkorteam.mbaas.server.bean.Configuration.TEMP_JDBC_DATABASE));
        String itest = java.lang.System.getProperty("itest");
        if (itest == null || "".equals(itest)) {
            mappedSchema.withOutput(xml.getString(com.angkorteam.mbaas.server.bean.Configuration.APP_JDBC_DATABASE));
        } else {
            mappedSchema.withOutput(xml.getString(com.angkorteam.mbaas.server.bean.Configuration.TEST_JDBC_DATABASE));
        }
        RenderMapping renderMapping = new RenderMapping();
        renderMapping.withSchemata(mappedSchema);
        Settings settings = new Settings();
        settings.withRenderMapping(renderMapping);
        settings.withExecuteWithOptimisticLocking(true);
        settings.setUpdatablePrimaryKeys(false);

        DefaultConfiguration configuration = new DefaultConfiguration();
        configuration.setSettings(settings);
        configuration.setDataSource(this.dataSource);
        configuration.set(SQLDialect.MYSQL);
//        if ("com.mysql.cj.jdbc.Driver".equals(dataSource.getDriverClassName())) {
//            configuration.set(SQLDialect.MYSQL);
//        } else if ("com.mysql.jdbc.Driver".equals(dataSource.getDriverClassName())) {
//            configuration.set(SQLDialect.MYSQL);
//        } else if ("org.hsqldb.jdbcDriver".equals(dataSource.getDriverClassName())) {
//            configuration.set(SQLDialect.HSQLDB);
//        } else if ("org.mariadb.jdbc.Driver".equals(dataSource.getDriverClassName())) {
//            configuration.set(SQLDialect.MARIADB);
//        }
        this.configuration = configuration;
    }
 
开发者ID:PkayJava,项目名称:MBaaS,代码行数:47,代码来源:ConfigurationFactoryBean.java


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