Last active
March 25, 2017 20:57
-
-
Save bytekast/c1ac17213dc6da0cffe83ff69e786fd8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@SpringBootApplication | |
@Log4j | |
class LambdaHandler implements RequestHandler<Map, Response> { | |
@Memoized | |
ApplicationContext getApplicationContext(String[] args = []) { | |
return SpringApplication.run(LambdaHandler.class, args) | |
} | |
@Override | |
Response handleRequest(Map input, Context context) { | |
final Request request = new Request(input, context) | |
DispatcherService dispatcher = getApplicationContext().getBean(DispatcherService.class) | |
return dispatcher.dispatch(request) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment