Allows user to set table prefix via properties.

resolves #244
This commit is contained in:
Glenn Renfro
2016-12-15 16:01:30 -05:00
committed by Michael Minella
parent 2eb1c49e12
commit 10bb457a5a
11 changed files with 165 additions and 24 deletions

View File

@@ -16,6 +16,8 @@
package org.springframework.cloud.task;
import javax.sql.DataSource;
import org.junit.After;
import org.junit.Test;
@@ -79,12 +81,12 @@ public class SimpleTaskConfigurationTests {
@Bean
public TaskConfigurer taskConfigurer1() {
return new DefaultTaskConfigurer(null);
return new DefaultTaskConfigurer((DataSource) null);
}
@Bean
public TaskConfigurer taskConfigurer2() {
return new DefaultTaskConfigurer(null);
return new DefaultTaskConfigurer((DataSource) null);
}
}

View File

@@ -99,8 +99,7 @@ public class TaskExecutionDaoFactoryBeanTests {
DataSource dataSource = this.context.getBean(DataSource.class);
TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean(dataSource);
factoryBean.setTablePrefix("foo_");
TaskExecutionDaoFactoryBean factoryBean = new TaskExecutionDaoFactoryBean(dataSource, "foo_");
TaskExecutionDao taskExecutionDao = factoryBean.getObject();
assertEquals("foo_", ReflectionTestUtils.getField(taskExecutionDao, "tablePrefix"));