This project is designed to demonstrate Spring Framework 5 Kotlin support and Functional web and bean APIs used together:
- Programmatic Bootstrap of Spring WebFlux application (not needed when Spring Boot is used)
- Spring Kotlin support
- Reactor Kotlin support
- Null-safety of Spring and Reactor API
- WebFlux Reactive web server and client
- Functional bean definition with Kotlin DSL (no reflection, no CGLIB proxies involved)
- WebFlux functional routing declaration with Kotlin DSL
- WebFlux and Reactor Netty native embedded server capabilities
- Gradle Kotlin DSL
- Junit 5
@BeforeAll
and@AfterAll
on non-static methods in Kotlin
You can also have a look to this WebFlux server DSL experiment in order to provide a more concise and idiomatic code for bootstrapping.
Current master
branch is based on standalone WebFlux runtime. Spring Boot is based
on JavaConfig and does not provide specific support functional bean definition yet (see
this issue where this is discussed).
That said, it is possible to use experimentally Spring Boot + functional bean definition together
via ApplicationContextInitializer
, see
this Spring Boot branch
for a concrete example.
Build the project and run tests with ./gradlew build
, create the executable JAR via ./gradlew shadowJar
, and run it via java -jar build/libs/spring-kotlin-functional-1.0.0-SNAPSHOT-all.jar
.