Java Code Examples for org.springframework.boot.jdbc.DataSourceInitializationMode

The following examples show how to use org.springframework.boot.jdbc.DataSourceInitializationMode. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
/**
 * 如果并未自定义配置信息
 * 使用默认的配置信息
 *
 * @return
 */
public QuartzConfigProperties getQuartz() {
    if (quartz == null) {
        // init
        quartz = new QuartzConfigProperties();

        // 设置任务存储方式为数据库方式
        quartz.setJobStoreType(JobStoreType.JDBC);

        // 设置schema初始化模式
        quartz.getJdbc().setInitializeSchema(DataSourceInitializationMode.EMBEDDED);

        // 设置属性配置
        quartz.getProperties().put("org.quartz.scheduler.instanceName", "jobScheduler");
        quartz.getProperties().put("org.quartz.scheduler.instanceId", "AUTO");
        quartz.getProperties().put("org.quartz.jobStore.class", "org.quartz.impl.jdbcjobstore.JobStoreTX");
        quartz.getProperties().put("org.quartz.jobStore.driverDelegateClass", "org.quartz.impl.jdbcjobstore.StdJDBCDelegate");
        quartz.getProperties().put("org.quartz.jobStore.tablePrefix", "JOB_NODE_QRTZ_");
        quartz.getProperties().put("org.quartz.jobStore.isClustered", "true");
        quartz.getProperties().put("org.quartz.jobStore.clusterCheckinInterval", "20000");
        quartz.getProperties().put("org.quartz.threadPool.threadsInheritContextClassLoaderOfInitializingThread", "true");
    }
    return quartz;
}
 
Example 2
@Override
protected DataSourceInitializationMode getMode() {
    return this.properties.getJdbc().getInitializeSchema();
}
 
Example 3
Source Project: beihu-boot   Source File: ApiBootQuartzProperties.java    License: Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
    return this.initializeSchema;
}
 
Example 4
Source Project: beihu-boot   Source File: ApiBootQuartzProperties.java    License: Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
    this.initializeSchema = initializeSchema;
}
 
Example 5
@Override
protected DataSourceInitializationMode getMode() {
    return this.properties.getJdbc().getInitializeSchema();
}
 
Example 6
Source Project: api-boot   Source File: ApiBootQuartzProperties.java    License: Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
    return this.initializeSchema;
}
 
Example 7
Source Project: api-boot   Source File: ApiBootQuartzProperties.java    License: Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
    this.initializeSchema = initializeSchema;
}
 
Example 8
@Override
protected DataSourceInitializationMode getMode() {
	return properties.getInitializer().getInitializeSchema();
}
 
Example 9
Source Project: spring-content   Source File: JpaVersionsProperties.java    License: Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
	return this.initializeSchema;
}
 
Example 10
Source Project: spring-content   Source File: JpaVersionsProperties.java    License: Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
	this.initializeSchema = initializeSchema;
}
 
Example 11
@Override
protected DataSourceInitializationMode getMode() {
	return properties.getInitializer().getInitializeSchema();
}
 
Example 12
Source Project: spring-content   Source File: ContentJpaProperties.java    License: Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
	return this.initializeSchema;
}
 
Example 13
Source Project: spring-content   Source File: ContentJpaProperties.java    License: Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
	this.initializeSchema = initializeSchema;
}