Skip to content

Commit

Permalink
Update Spring version (#100)
Browse files Browse the repository at this point in the history
* Update Spring version to 2.4.13
  • Loading branch information
alfespa17 authored Nov 25, 2021
1 parent 750ee45 commit 22cfcc4
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception {
}

@Bean
public SchedulerFactoryBean schedulerFactoryBean(ApplicationContext applicationContext, DataSource quartzDataSource, DataSourceConfigurationProperties dataSourceConfigurationProperties) {
public SchedulerFactoryBean schedulerFactoryBean(ApplicationContext applicationContext, DataSource dataSource, DataSourceConfigurationProperties dataSourceConfigurationProperties) {
SchedulerFactoryBean schedulerFactoryBean = new SchedulerFactoryBean();
schedulerFactoryBean.setJobFactory(new AutowireCapableBeanJobFactory(applicationContext.getAutowireCapableBeanFactory()));
schedulerFactoryBean.setDataSource(quartzDataSource);
schedulerFactoryBean.setDataSource(dataSource);
Properties properties = new Properties();
properties.put("org.quartz.jobStore.class","org.quartz.impl.jdbcjobstore.JobStoreTX");
properties.put("org.quartz.jobStore.class","org.springframework.scheduling.quartz.LocalDataSourceJobStore");
properties.put("org.quartz.jobStore.isClustered","true");
properties.put("org.quartz.scheduler.instanceId","AUTO");
switch(dataSourceConfigurationProperties.getType()){
Expand All @@ -64,6 +64,7 @@ public SchedulerFactoryBean schedulerFactoryBean(ApplicationContext applicationC
@Bean
public Scheduler scheduler(SchedulerFactoryBean schedulerFactoryBean) throws SchedulerException {
Scheduler scheduler = schedulerFactoryBean.getScheduler();

scheduler.start();
return scheduler;
}
Expand Down
3 changes: 2 additions & 1 deletion api/src/test/resources/application-test.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,5 @@ org.terrakube.hostname=localhost:8080
##############
#QUARTZ SETUP#
##############
spring.quartz.job-store-type=memory
spring.quartz.job-store-type=jdbc
spring.quartz.jdbc.initialize-schema=never
4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.11</version>
<version>2.4.13</version>
</parent>

<groupId>org.azbuilder.api</groupId>
Expand All @@ -15,7 +15,7 @@
<packaging>pom</packaging>

<properties>
<revision>1.6.3</revision>
<revision>1.6.4</revision>
<sonar.organization>azbuilder</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
<sonar.project.key>AzBuilder_azb-server</sonar.project.key>
Expand Down

0 comments on commit 22cfcc4

Please sign in to comment.