Spring Cloud数据流不显示Spring Cloud任务执行详细信息 [英] Spring Cloud data flow does not show Spring cloud task execution details

查看:165
本文介绍了Spring Cloud数据流不显示Spring Cloud任务执行详细信息的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Spring云数据流文档提到

The Spring cloud dataflow documentation mentions

在外部(即命令行)执行任务时,如果您希望Spring Cloud Data Flow在其UI中显示TaskExecutions,请确保在两者之间共享通用的数据源设置.默认情况下,Spring Cloud Task将使用本地H2实例,并且执行不会记录到Spring Cloud Data Flow使用的数据库中.

When executing tasks externally (i.e. command line) and you wish for Spring Cloud Data Flow to show the TaskExecutions in its UI, be sure that common datasource settings are shared among the both. By default Spring Cloud Task will use a local H2 instance and the execution will not be recorded to the database used by Spring Cloud Data Flow.

我是Spring Cloud数据流和Spring Cloud任务的新手.有人可以帮助我如何为两者设置通用数据源.为了我的开发目的,我使用了嵌入式H2数据库.我可以使用嵌入式工具在Spring Flo/Dashboard中查看任务执行的详细信息吗?

I am new to Spring cloud dataflow and spring cloud task. Can somebody help me how to setup a common datasource for both. For my development purpose I'm using the embedded H2 database. Can I use the embedded one to see task execution details in Spring Flo/Dashboard?

推荐答案

Spring Cloud Data Flow(SCDF)和您的Spring Cloud Task(SCT)应用程序之间必须共享一个通用的数据源" 以便跟踪和监视任务执行情况.如果不共享数据源,则默认情况下,SCDF和SCT应用程序均使用个人 H2数据库.而且由于它们位于不同的数据库中,因此SCDF中的task-executions将无法查看SCT微服务应用程序的独立执行历史记录.

A common "datasource" must be shared between Spring Cloud Data Flow (SCDF) and your Spring Cloud Task (SCT) applications in order to track and monitor task executions. If the datasource is not shared, both SCDF and SCT applications by default use a individual H2 database. And because they are on different databases, the task-executions in SCDF won't have visibility to independent execution history of SCT microservice applications.

确保为这两个数据库提供通用的数据库属性.在您的情况下,您可以提供相同的H2 DB属性.它就像Spring Boot DB属性覆盖一样简单.

Make sure to supply common DB properties to both. In your case, you can supply the same H2 DB properties. It is as simple as Spring Boot DB property overrides.

这篇关于Spring Cloud数据流不显示Spring Cloud任务执行详细信息的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆