Updated to files to fit the Standard.

This commit is contained in:
Glenn Renfro
2022-07-25 11:41:43 -04:00
parent 39908bb499
commit 76a5d12136
200 changed files with 2839 additions and 4125 deletions

View File

@@ -48,30 +48,25 @@ public class TaskProcessor {
String message = messagePayload.getPayload();
Map<String, String> properties = new HashMap<>();
if (StringUtils.hasText(this.processorProperties.getDataSourceUrl())) {
properties
.put("spring_datasource_url", this.processorProperties
.getDataSourceUrl());
properties.put("spring_datasource_url", this.processorProperties.getDataSourceUrl());
}
if (StringUtils
.hasText(this.processorProperties.getDataSourceDriverClassName())) {
properties.put("spring_datasource_driverClassName", this.processorProperties
.getDataSourceDriverClassName());
if (StringUtils.hasText(this.processorProperties.getDataSourceDriverClassName())) {
properties.put("spring_datasource_driverClassName",
this.processorProperties.getDataSourceDriverClassName());
}
if (StringUtils.hasText(this.processorProperties.getDataSourceUserName())) {
properties.put("spring_datasource_username", this.processorProperties
.getDataSourceUserName());
properties.put("spring_datasource_username", this.processorProperties.getDataSourceUserName());
}
if (StringUtils.hasText(this.processorProperties.getDataSourcePassword())) {
properties.put("spring_datasource_password", this.processorProperties
.getDataSourcePassword());
properties.put("spring_datasource_password", this.processorProperties.getDataSourcePassword());
}
properties.put("payload", message);
TaskLaunchRequest request = new TaskLaunchRequest(
this.processorProperties.getUri(), null, properties, null,
this.processorProperties.getApplicationName());
TaskLaunchRequest request = new TaskLaunchRequest(this.processorProperties.getUri(), null, properties, null,
this.processorProperties.getApplicationName());
return MessageBuilder.withPayload(request).build();
};
}
}

View File

@@ -28,4 +28,5 @@ public class TaskProcessorApplication {
public static void main(String[] args) {
SpringApplication.run(TaskProcessorApplication.class, args);
}
}

View File

@@ -25,8 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
public class TaskProcessorProperties {
private static final String DEFAULT_URI = "maven://org.springframework.cloud.task.app:"
+ "timestamp-task:jar:1.0.1.RELEASE";
+ "timestamp-task:jar:1.0.1.RELEASE";
private String uri = DEFAULT_URI;
@@ -40,7 +39,6 @@ public class TaskProcessorProperties {
private String applicationName;
public String getDataSourceUrl() {
return this.dataSourceUrl;
}
@@ -88,4 +86,5 @@ public class TaskProcessorProperties {
public void setApplicationName(String applicationName) {
this.applicationName = applicationName;
}
}