Вопрос

Using Spring Integration how can we use the spEL to display the header and payload :

     <int:message-history/>
     <int:logging-channel-adapter id="logger" expression="'Id:' + payload.id + '; Date:' + payload.createdAt + '; FromUser: ' + payload.fromUser + '; Content: ' + payload.text"  level="INFO" />
Это было полезно?

Решение

Your expression is correct. Now you build the String using SpEL with several properties of payload.

To do the same for headers you should use the same for specific headers SpEL variable:

<int:logging-channel-adapter id="logger" expression="'Id:' + headers.id + '; Date:' + headers.timestamp"  level="INFO" />

Any provided header is available from here.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top