我在SCDF中有一个Spring Cloud Task,它使用任务定义成功启动:
some-task --some.property=test不过,我想在任务启动时设置some.property属性。我认为我可以通过设置部署属性app.*.some.property=test来实现这一点,但这对本地或cloudfoundry任务启动器/部署器都不起作用。
上述部署属性适用于流,但不适用于任务。它应该与任务一起工作吗?如果不是,为什么?
发布于 2018-12-13 22:51:42
是。我们可以在启动任务时传递属性。
任务应用程序需要与Dataflow服务器用来记录步骤和执行的相同的数据库连接。我在本地SCDF中部署了以下任务。
task create --definition "timestmp_custm --timestamp.format=\"dd.MM.yyyy\"" --name taskTimestmp2
task launch taskTimestmp2 --arguments "--spring.datasource.url=jdbc:mysql://localhost:3306/mydb --spring.datasource.username=root --spring.datasource.driver-class-name=org.mariadb.jdbc.Driver"https://stackoverflow.com/questions/53735026
复制相似问题