spring-cloud-dataflow
spring-cloud-dataflow copied to clipboard
Application properties not working in task launch
Description:
Application properties are not working in task launch.
application properties:
app.dashboard-daily-initializer.dashboard.daily.test=1
arguments: --test=1
in Task Executions, I could see the application properties as below
I read the same in spring batch project as below
@Getter @Setter @ConfigurationProperties(prefix = "dashboard.daily") @NoArgsConstructor public class DashboardInitializerProperties {
private String test;
}
when job executions launches from task executions, I don't see the properties
SCDF version : 2.11.0
I am using SPRING_APPLICATION_JSON: { "maven": { "local-repository": null, "remote-repositories": { "repo1": { "url": "https://repo.spring.io/libs-snapshot"} } } }
SCDF version : 2.11.0 Java : 11 Sprint boot 2.7.13
The same code works in SCDF 2.6, after migrating it to 2.11.0, it does not work.. Any lights on this pls.
When I launch task from SCDF UI/scheduler with application properties, I dont see the arguments in the logs
SimpleTaskRepository[0;39m: Creating: TaskExecution{executionId=0, parentExecutionId=null, exitCode=null, taskName='dashboard.daily.initializer-1', startTime=Thu Jan 04 16:03:05 UTC 2024, endTime=null, exitMessage='null', externalExecutionId='null', errorMessage='null', arguments=[]} Running default command line with: []
I was unable to reproduce your issue using the local deployer. The only thing that I can see from the samples you provided are as follows:
- the command line argument should look something like
app.proptask.0=--dashboard.daily.test=mytest - Did you create a bean for your or add
@Configurationannotation to yourDashboardInitializerPropertiesin your application?
What platform are you deploying to? Can you provide a sample app that reproduces the issue?
Closing due to inactivity. If closed in error please let us know.