Introduction: Spring Fu is an experimental Kotlin micro-framework that makes it easy to create lightweight Spring-powered applications with functional APIs instead of annotations
More: Author   ReportBugs   

image::https://ci.spring.io/api/v1/teams/spring-fu/pipelines/spring-fu/badge["Build Status", link="https://ci.spring.io/teams/spring-fu/pipelines/spring-fu"]

Spring Fu (for functional APIs) is an experimental https://kotlinlang.org/[Kotlin] micro-framework based on functional configuration intended to test ideas for upcoming https://spring.io/projects/spring-boot[Spring Boot] releases. It makes it easy to create fast and lightweight https://spring.io/projects/spring-framework[Spring]-powered applications with <> instead of annotations.

See the https://repo.spring.io/snapshot/org/springframework/fu/spring-fu-reference/0.0.1.BUILD-SNAPSHOT/spring-fu-reference-0.0.1.BUILD-SNAPSHOT.html[reference documentation] for more details.

== Overview

A simple Spring Fu web application rendering an HTML page and exposing a JSON HTTP endpoint looks like that:

fun main(args: Array<String>) = application {
    webflux {
        val port = if (profiles.contains("test")) 8181 else 8080
        server(netty(port)) {
            codecs {
            router {
                val userHandler = ref<UserHandler>()
                GET("/", userHandler::listView)
                GET("/api/user", userHandler::listApi)
}.run(await = true)

It leverages a subset of Spring https://github.com/spring-projects/spring-fu/issues?q=is%3Aissue+label%3Aspring-framework[Framework], https://github.com/spring-projects/spring-fu/issues?q=is%3Aissue+label%3A%22spring+boot%22[Boot], https://github.com/spring-projects/spring-fu/issues?q=is%3Aissue+is%3Aopen+label%3Aspring-data[ Data] and Security to provide an alternative configuration model for developing applications in Kotlin:

Please send us your feedback on the #spring channel of http://slack.kotlinlang.org/[Kotlin Slack]. Feel free to open issues, https://raw.githubusercontent.com/spring-projects/spring-fu/master/CONTRIBUTING.adoc[contribute] fixes or new modules via pull requests.

== Getting started

Spring Fu https://github.com/spring-projects/spring-fu/milestone/1[`0.0.1`] is currently under active development so no release is available yet, but you have can try https://repo.spring.io/snapshot/org/springframework/fu/[`0.0.1.BUILD-SNAPSHOT` builds].

=== Bootstrap

A Spring Fu bootstrap is an archive containing minimal project templates designed to allow you getting started quickly and easily Spring Fu applications. To start a new project, download a bootstrap .zip archive, extract it and follow README.adoc instructions.

=== Documentation

To start with Spring Fu, you can read the https://repo.spring.io/snapshot/org/springframework/fu/spring-fu-reference/0.0.1.BUILD-SNAPSHOT/spring-fu-reference-0.0.1.BUILD-SNAPSHOT.html[**reference documentation**].

API documentation will be available https://github.com/spring-projects/spring-fu/issues/8[shortly].

You can have a look to the sample applications:

=== Credits

In addition to the whole Spring and Reactor teams, special credits to:

Support Me
About Me
Google+: Trinea trinea
GitHub: Trinea