GH-698 Fix routing function support in AWS
Introduce auto-fallback to routing function if more then one function is present and no definition is provided. Add explicit routing sample Add documentation
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package example;
|
||||
|
||||
import java.util.function.Function;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
|
||||
@SpringBootApplication
|
||||
public class FunctionConfiguration {
|
||||
|
||||
/*
|
||||
* You need this main method or explicit <start-class>example.FunctionConfiguration</start-class>
|
||||
* in the POM to ensure boot plug-in makes the correct entry
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(FunctionConfiguration.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Function<String, String> uppercase() {
|
||||
return value -> value.toUpperCase();
|
||||
}
|
||||
|
||||
@Bean
|
||||
public Function<String, String> reverse() {
|
||||
return value -> new StringBuilder(value).reverse().toString();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
logging.level.org.springframework.cloud=DEBUG
|
||||
@@ -0,0 +1,20 @@
|
||||
log4j.rootCategory=DEBUG, LAMBDA
|
||||
PID=????
|
||||
LOG_LEVEL_PATTERN=%5p
|
||||
LOG_PATTERN=[%d{yyyy-MM-dd HH:mm:ss.SSS}] boot%X{context} - ${PID} ${LOG_LEVEL_PATTERN} [%t] --- %c{1}: %m%n
|
||||
# CONSOLE is set to be a ConsoleAppender using a PatternLayout.
|
||||
log4j.appender.LAMBDA=com.amazonaws.services.lambda.runtime.log4j.LambdaAppender
|
||||
log4j.appender.LAMBDA.layout=org.apache.log4j.PatternLayout
|
||||
log4j.appender.LAMBDA.layout.conversionPattern=${LOG_PATTERN}
|
||||
log4j.category.org.apache.catalina.startup.DigesterFactory=ERROR
|
||||
log4j.category.org.apache.catalina.util.LifecycleBase=ERROR
|
||||
log4j.category.org.apache.coyote.http11.Http11NioProtocol=WARN
|
||||
log4j.category.org.apache.sshd.common.util.SecurityUtils
|
||||
log4j.category.org.apache.tomcat.util.net.NioSelectorPool=WARN
|
||||
log4j.category.org.crsh.plugin=WARN
|
||||
log4j.category.org.crsh.ssh=WARN
|
||||
log4j.category.org.eclipse.jetty.util.component.AbstractLifeCycle=ERROR
|
||||
log4j.category.org.hibernate.validator.internal.util.Version=WARN
|
||||
log4j.category.org.springframework.boot.actuate.autoconfigure.CrshAutoConfiguration=WARN
|
||||
log4j.category.org.springframework.boot.actuate.endpoint.jmx=WARN
|
||||
log4j.category.org.thymeleaf=WARN
|
||||
Reference in New Issue
Block a user