org.springframework.boot.jdbc.DataSourceInitializationMode Java Examples

The following examples show how to use org.springframework.boot.jdbc.DataSourceInitializationMode. 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
Source File: JobServerProperties.java    From spring-boot-starter-micro-job with Apache License 2.0 6 votes vote down vote up
/**
 * 如果并未自定义配置信息
 * 使用默认的配置信息
 *
 * @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
Source File: ApiBootQuartzDataSourceInitializer.java    From beihu-boot with Apache License 2.0 4 votes vote down vote up
@Override
protected DataSourceInitializationMode getMode() {
    return this.properties.getJdbc().getInitializeSchema();
}
 
Example #3
Source File: ApiBootQuartzProperties.java    From beihu-boot with Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
    return this.initializeSchema;
}
 
Example #4
Source File: ApiBootQuartzProperties.java    From beihu-boot with Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
    this.initializeSchema = initializeSchema;
}
 
Example #5
Source File: ApiBootQuartzDataSourceInitializer.java    From api-boot with Apache License 2.0 4 votes vote down vote up
@Override
protected DataSourceInitializationMode getMode() {
    return this.properties.getJdbc().getInitializeSchema();
}
 
Example #6
Source File: ApiBootQuartzProperties.java    From api-boot with Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
    return this.initializeSchema;
}
 
Example #7
Source File: ApiBootQuartzProperties.java    From api-boot with Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
    this.initializeSchema = initializeSchema;
}
 
Example #8
Source File: JpaVersionsDatabaseInitializer.java    From spring-content with Apache License 2.0 4 votes vote down vote up
@Override
protected DataSourceInitializationMode getMode() {
	return properties.getInitializer().getInitializeSchema();
}
 
Example #9
Source File: JpaVersionsProperties.java    From spring-content with Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
	return this.initializeSchema;
}
 
Example #10
Source File: JpaVersionsProperties.java    From spring-content with Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
	this.initializeSchema = initializeSchema;
}
 
Example #11
Source File: ContentJpaDatabaseInitializer.java    From spring-content with Apache License 2.0 4 votes vote down vote up
@Override
protected DataSourceInitializationMode getMode() {
	return properties.getInitializer().getInitializeSchema();
}
 
Example #12
Source File: ContentJpaProperties.java    From spring-content with Apache License 2.0 4 votes vote down vote up
public DataSourceInitializationMode getInitializeSchema() {
	return this.initializeSchema;
}
 
Example #13
Source File: ContentJpaProperties.java    From spring-content with Apache License 2.0 4 votes vote down vote up
public void setInitializeSchema(DataSourceInitializationMode initializeSchema) {
	this.initializeSchema = initializeSchema;
}