Kotlin Support in Spring Cloud Function
Rarely we blog about a single feature, but given that this one was one of the most requested ones in Spring Cloud Function (relatively young project), we thought it may be appropriate, so here it is.
Initial support for Kotlin lambdas has been added to Spring Cloud Function. What it means is that Spring Cloud Function can now recognize Kotlin lambdas that effectively match to one of Java's Supplier
, Function
or Consumer
and treat them as such.
That is:
@Bean
open fun kotlinFunction(): (String) -> String {
return { it.toUpperCase() }
}
@Bean
open fun kotlinConsumer(): (String…