Skip to content
This repository was archived by the owner on May 14, 2025. It is now read-only.

Commit 2193d11

Browse files
cppwfstrisberg
authored andcommitted
Remove auto registration of composed-task-runner
resolves #1230
1 parent ff2de24 commit 2193d11

File tree

3 files changed

+0
-43
lines changed

3 files changed

+0
-43
lines changed

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/features/ComposedTaskProperties.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.cloud.dataflow.server.config.features;
1818

19-
import java.net.URI;
20-
import java.net.URISyntaxException;
21-
2219
import org.springframework.boot.context.properties.ConfigurationProperties;
2320

2421
/**
@@ -29,28 +26,8 @@ public class ComposedTaskProperties {
2926

3027
public static final String COMPOSED_TASK_PREFIX = "spring.cloud.dataflow.composed.task";
3128

32-
private URI composedTaskRunnerUri;
33-
3429
private String taskName = "composed-task-runner";
3530

36-
public ComposedTaskProperties() {
37-
try {
38-
composedTaskRunnerUri = new URI("maven://org.springframework.cloud.task.app:composedtaskrunner-task:1.0.0.BUILD-SNAPSHOT");
39-
}
40-
catch (URISyntaxException e) {
41-
throw new IllegalStateException(
42-
"Invalid URI specified for composedTaskRunnerUri");
43-
}
44-
}
45-
46-
public URI getComposedTaskRunnerUri() {
47-
return composedTaskRunnerUri;
48-
}
49-
50-
public void setComposedTaskRunnerUri(URI composedTaskRunnerUri) {
51-
this.composedTaskRunnerUri = composedTaskRunnerUri;
52-
}
53-
5431
public String getTaskName() {
5532
return taskName;
5633
}

spring-cloud-dataflow-server-core/src/main/java/org/springframework/cloud/dataflow/server/config/features/TaskConfiguration.java

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
*/
1616
package org.springframework.cloud.dataflow.server.config.features;
1717

18-
import java.net.URI;
19-
import java.net.URISyntaxException;
2018
import javax.sql.DataSource;
2119

2220
import org.h2.tools.Server;
@@ -37,7 +35,6 @@
3735
import org.springframework.boot.autoconfigure.jdbc.DataSourceProperties;
3836
import org.springframework.boot.context.properties.EnableConfigurationProperties;
3937
import org.springframework.cloud.dataflow.configuration.metadata.ApplicationConfigurationMetadataResolver;
40-
import org.springframework.cloud.dataflow.core.ApplicationType;
4138
import org.springframework.cloud.dataflow.registry.AppRegistry;
4239
import org.springframework.cloud.dataflow.server.job.TaskExplorerFactoryBean;
4340
import org.springframework.cloud.dataflow.server.repository.RdbmsTaskDefinitionRepository;
@@ -56,8 +53,6 @@
5653
import org.springframework.context.annotation.Bean;
5754
import org.springframework.context.annotation.Configuration;
5855
import org.springframework.core.io.ResourceLoader;
59-
import org.springframework.context.event.ContextRefreshedEvent;
60-
import org.springframework.context.event.EventListener;
6156
import org.springframework.jdbc.datasource.DataSourceTransactionManager;
6257

6358
/**
@@ -75,12 +70,6 @@ public class TaskConfiguration {
7570
@Autowired
7671
DataSourceProperties dataSourceProperties;
7772

78-
@Autowired
79-
private AppRegistry appRegistry;
80-
81-
@Autowired
82-
private ComposedTaskProperties composedTaskProperties;
83-
8473
@Bean
8574
public TaskExplorerFactoryBean taskExplorerFactoryBean(DataSource dataSource) {
8675
return new TaskExplorerFactoryBean(dataSource);
@@ -195,9 +184,4 @@ public TaskDefinitionRepository taskDefinitionRepository(DataSource dataSource)
195184
}
196185
}
197186

198-
@EventListener
199-
public void handleContextRefresh(ContextRefreshedEvent event) {
200-
appRegistry.save(composedTaskProperties.getTaskName(), ApplicationType.task, composedTaskProperties.getComposedTaskRunnerUri(), null);
201-
}
202-
203187
}

spring-cloud-starter-dataflow-server-local/src/main/resources/dataflow-server.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,6 @@ spring:
2424
cloud:
2525
config:
2626
uri: http://localhost:8888
27-
dataflow:
28-
composed:
29-
task:
30-
composedTaskRunnerUri: maven://org.springframework.cloud.task.app:composedtaskrunner-task:1.0.0.BUILD-SNAPSHOT
3127

3228
datasource:
3329
url: jdbc:h2:tcp://localhost:19092/mem:dataflow

0 commit comments

Comments
 (0)