Changes to support putting SCDF back onto snapshot
* Only configure the BatchListener if the Job.class has a bean instance * Add the task-batch to the task-dependencies pom.
This commit is contained in:
@@ -16,14 +16,14 @@
|
||||
package org.springframework.cloud.task.batch.configuration;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
import org.springframework.batch.core.Job;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnBean;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
|
||||
import org.springframework.cloud.task.batch.listener.TaskBatchExecutionListener;
|
||||
import org.springframework.cloud.task.configuration.EnableTask;
|
||||
import org.springframework.cloud.task.repository.TaskExplorer;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -35,7 +35,7 @@ import org.springframework.util.CollectionUtils;
|
||||
* @author Michael Minella
|
||||
*/
|
||||
@Configuration
|
||||
@ConditionalOnClass({Job.class, EnableTask.class})
|
||||
@ConditionalOnBean({Job.class})
|
||||
public class TaskBatchAutoConfiguration {
|
||||
|
||||
@Bean
|
||||
|
||||
@@ -22,6 +22,11 @@
|
||||
<artifactId>spring-cloud-task-core</artifactId>
|
||||
<version>1.0.0.BUILD-SNAPSHOT</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.springframework.cloud</groupId>
|
||||
<artifactId>spring-cloud-task-batch</artifactId>
|
||||
<version>1.0.0.BUILD-SNAPSHOT</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</dependencyManagement>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user