Posts

Showing posts from August, 2020

Spring Cloud Function as Multi Cloud Framework (Azure Function + AWS Lambda + Gradle)

Image
As the title mentioned, this post is about creating a Gradle Spring Boot project that can deploy to both Azure Functions and AWS Lambda. SpringBootConfiguration Before we get into the multicloud project, a bit exploration on the Spring Boot and Spring Cloud Function. Spring Cloud Function provides a faster way to load the Spring Boot application thereby reducing the notorious cold start time experienced in AWS Lam With Spring Boot @SpringBootApplication and @Bean @SpringBootApplication public class MulticloudApplication { @Bean public Function<String , String> uppercase () { return value -> value.toUpperCase() ; } public static void main (String[] args) { SpringApplication. run (MulticloudApplication. class, args) ; } } AWS Lambda Java Cold Start Duration: 4814.89 ms With Spring Boot @SpringBootConfiguration and Java Function<> @SpringBootConfiguration public class MulticloudApplication implements Function<String , String> { public static voi