This commit is contained in:
Dave Syer
2018-01-25 09:36:37 +00:00
parent ab30b755ba
commit 54873b66d5
2 changed files with 10 additions and 1 deletions

View File

@@ -29,6 +29,14 @@ import reactor.core.publisher.Flux;
*/
public class AzureSpringBootRequestHandler<I, O> extends AzureSpringFunctionInitializer {
public AzureSpringBootRequestHandler(Class<?> configurationClass) {
super(configurationClass);
}
public AzureSpringBootRequestHandler() {
super();
}
public O handleRequest(I foo, ExecutionContext context) {
if (context != null) {
context.getLogger().fine("Handler Java HTTP trigger processed a request.");

View File

@@ -36,7 +36,8 @@ public class MapTests {
@Test
public void start() throws Exception {
AzureSpringBootRequestHandler<Foo, Bar> handler = new AzureSpringBootRequestHandler<>();
AzureSpringBootRequestHandler<Foo, Bar> handler = new AzureSpringBootRequestHandler<>(
Config.class);
Bar result = handler.handleRequest(new Foo("foo"), null);
handler.close();
assertThat(result.getValue()).isEqualTo("FOO");