GH-460 Add support for function filtering

Added support for function filtering in the event there are more then one function in catalog. This is primarily to ensure that
we have a mechanism to specify which functions to export as web enpoints (instead of all)

Resolves #460
This commit is contained in:
Oleg Zhurakousky
2020-03-23 11:19:40 +01:00
parent 919b9902e9
commit 85000ee084
6 changed files with 278 additions and 22 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2019 the original author or authors.
* Copyright 2017-2020 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ package org.springframework.cloud.function.adapter.aws;
import java.util.function.Function;
import org.junit.Before;
import org.junit.Test;
import org.springframework.boot.autoconfigure.jackson.JacksonAutoConfiguration;
@@ -36,6 +37,11 @@ public class SpringBootRequestHandlerTests {
private SpringBootRequestHandler<Foo, Bar> handler;
@Before
public void after() {
System.clearProperty("spring.cloud.function.definition");
}
@Test
public void functionBean() throws Exception {
this.handler = new SpringBootRequestHandler<Foo, Bar>(FunctionConfig.class);