@@ -219,10 +219,11 @@ public <P> EnricherSpec propertyFunction(String key, Function<Message<P>, Object
219
219
* Set a header with the value if it is not already present.
220
220
* @param name the header name.
221
221
* @param value the value.
222
+ * @param <V> the value type.
222
223
* @return the enricher spec.
223
224
* @see ContentEnricher#setHeaderExpressions(Map)
224
225
*/
225
- public EnricherSpec header (String name , Object value ) {
226
+ public < V > EnricherSpec header (String name , V value ) {
226
227
return header (name , value , null );
227
228
}
228
229
@@ -302,10 +303,11 @@ private EnricherSpec headerExpression(String name, Expression expression, @Nulla
302
303
* Set a header value using an explicit {@link HeaderValueMessageProcessor}.
303
304
* @param headerName the header name.
304
305
* @param headerValueMessageProcessor the headerValueMessageProcessor.
306
+ * @param <V> the value type.
305
307
* @return the enricher spec.
306
308
* @see ContentEnricher#setHeaderExpressions(Map)
307
309
*/
308
- public EnricherSpec header (String headerName , HeaderValueMessageProcessor <Object > headerValueMessageProcessor ) {
310
+ public < V > EnricherSpec header (String headerName , HeaderValueMessageProcessor <V > headerValueMessageProcessor ) {
309
311
Assert .hasText (headerName , "'headerName' must not be empty" );
310
312
this .headerExpressions .put (headerName , headerValueMessageProcessor );
311
313
return _this ();
0 commit comments