Add composite function support for the sources
This commit is contained in:
committed by
Soby Chacko
parent
92b2fc2f39
commit
d56525b27a
@@ -24,6 +24,7 @@ import java.util.function.Function;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
||||
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -39,6 +40,7 @@ import org.springframework.messaging.Message;
|
||||
*/
|
||||
@Configuration
|
||||
@EnableConfigurationProperties(HeaderEnricherFunctionProperties.class)
|
||||
@ConditionalOnProperty(prefix = "header.enricher", value = "headers")
|
||||
public class HeaderEnricherFunctionConfiguration {
|
||||
|
||||
@Autowired
|
||||
|
||||
@@ -16,7 +16,6 @@
|
||||
|
||||
package org.springframework.cloud.fn.header.enricher;
|
||||
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
@@ -36,13 +35,13 @@ import org.springframework.validation.annotation.Validated;
|
||||
public class HeaderEnricherFunctionProperties {
|
||||
|
||||
/**
|
||||
* \n separated properties representing headers in which values are SpEL expressions,
|
||||
* e.g foo='bar' \n baz=payload.baz.
|
||||
* \n separated properties representing headers in which values are SpEL expressions, e.g
|
||||
* foo='bar' \n baz=payload.baz.
|
||||
*/
|
||||
private Properties headers;
|
||||
|
||||
/**
|
||||
* set to true to overwrite any existing message headers.
|
||||
* set to true to overwrite any existing message headers.
|
||||
*/
|
||||
private boolean overwrite = false;
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
|
||||
org.springframework.cloud.fn.header.enricher.HeaderEnricherFunctionConfiguration
|
||||
Reference in New Issue
Block a user