从Spring集成DSL到数据库的日志记录

从Spring集成DSL到数据库的日志记录,spring,spring-integration,spring-integration-dsl,Spring,Spring Integration,Spring Integration Dsl,我正在使用Spring集成JavaDSL开发应用程序 使用应用程序中的Spring数据JPA登录数据库的最佳方式是什么 我有一个相当长的集成流程,包含多个HTTP GET和POST。我希望至少记录发送和响应的消息,以及使用了哪些URL,可能还有一些其他自定义值 我尝试了使用方法IntegrationFlowBuilder.log进行日志记录。有了这些,我的计划是创建一些定制的日志记录器,将日志记录到数据库中 我尝试了方法IntegrationFlowBuilder.enrichHeaders和方

我正在使用Spring集成JavaDSL开发应用程序

使用应用程序中的Spring数据JPA登录数据库的最佳方式是什么

我有一个相当长的集成流程,包含多个HTTP GET和POST。我希望至少记录发送和响应的消息,以及使用了哪些URL,可能还有一些其他自定义值

我尝试了使用方法
IntegrationFlowBuilder.log
进行日志记录。有了这些,我的计划是创建一些定制的日志记录器,将日志记录到数据库中


我尝试了方法
IntegrationFlowBuilder.enrichHeaders
和方法
IntegrationFlowBuilder.log
来记录URLSs和其他自定义值。如何更改
IntegrationFlowBuilder
中的某些标题条目?我已经添加了具有相同键和不同值的条目,但是日志中的值没有改变

用于
enrichHeaders()
HeaderRicherSpec
提供如下选项:

/**
 * Determine the default action to take when setting individual header specifications
 * without an explicit 'overwrite' argument.
 * @param defaultOverwrite the defaultOverwrite.
 * @return the header enricher spec.
 * @see HeaderEnricher#setDefaultOverwrite(boolean)
 */
public HeaderEnricherSpec defaultOverwrite(boolean defaultOverwrite) {
此外,每个添加到标题中的条目都可以使用自己的
override
标志指定:

/**
 * Add a single header specification where the value is a String representation of a
 * SpEL {@link Expression}.
 * @param name the header name.
 * @param expression the expression.
 * @param overwrite true to overwrite an existing header.
 * @return the header enricher spec.
 */
public HeaderEnricherSpec headerExpression(String name, String expression, Boolean overwrite) {