Sébastien Deleuze

Sébastien Deleuze

Recent Blog posts by Sébastien Deleuze

Going Reactive with Spring, Coroutines and Kotlin Flow

Engineering | April 12, 2019 | ...

Since we announced Spring Framework official support for Kotlin in January 2017, a lot of things happened. Kotlin was announced as an official Android development language at Google I/O 2017, we continued to improve the Kotlin support across Spring portfolio and Kotlin itself has continued to evolve with key new features like coroutines.

I would like to take the opportunity of the first milestone of Spring Framework 5.2 to give a status overview of where we are when it comes to Spring and Kotlin. And I will make my best to focus on concrete improvements since I believe Spring and Kotlin share…

The evolution of Spring Fu

Engineering | October 02, 2018 | ...

I take the opportunity of a short stop between SpringOne platform where I gave the first talk about Spring Fu and Kotlinconf to give an overview of the evolution of this project, summarize the current status and share what could be the next steps.

Early June, I announced a new experimental project named Spring Fu, with the goal to experiment on a new kind of API to configure Spring applications using Kotlin DSL and functional configuration.

I must admit I was not expecting the huge wave of feedback that followed, and I would like to thank the Spring community for such warm welcome. I have…

New tutorial about Spring Boot and Kotlin

Engineering | May 11, 2018 | ...

For 2 years, we have introduced Kotlin support in Spring projects (Framework, Boot, Data) and published various blog posts, sample projects, slides and documentation. Today, we are publishing an opinionated tutorial intended to summarize in a single place how to build a Spring Boot web application in Kotlin leveraging these features and following best practices: https://spring.io/guides/tutorials/spring-boot-kotlin/

Topics covered are:

  • How to create a Spring Boot 2 project in Kotlin
  • Understanding the build configuration
  • Testing with JUnit 5: integration tests, @WebMvcTest + mocking
  • Persistence with JPA and data classes
  • Creating your own extensions
  • Rendering web pages with Mustache
  • HTTP API with @RestController
  • Configuration properties

Spring Framework 5 Kotlin APIs, the functional way

Engineering | August 01, 2017 | ...

Update: see also Spring Fu experimental project.

Since our original announcement (very well received by the community!) of official Kotlin support in Spring Framework 5, we have continued to work towards even stronger Kotlin support in conjunction with recent refinements in Spring WebFlux.

In order to demonstrate these features, and how they could be used together, I have created a new spring-kotlin-functional demo application which is a standalone Spring WebFlux application, developed in Kotlin, with Mustache template rendering, JSON REST webservices and Server-Sent Events streaming…

Reactor Kotlin Extensions 1.0.0.M1 released

Releases | March 28, 2017 | ...

Update: Kotlin is now natively supported by reactor-core and reactor-test without requiring any additional extensions.

I am excited to announce the release of the first milestone of Reactor Kotlin Extensions, which provides Kotlin extensions for Reactor API.

It provides support for Kotlin types like KClass, takes advantage of Kotlin reified type parameters and provide various extensions to allow more expressive code. You can see bellow a quick comparaison of Reactor with Java versus Reactor with Kotlin + extensions.

Java Kotlin with extensions
Mono.just("foo") "foo".toMono()
Flux.fromIterable(list) list.toFlux()
Mono.error(new RuntimeException()) RuntimeException().toMono()
Flux.error(new RuntimeException()) RuntimeException().toFlux()
flux.ofType(Foo.class) flux.ofType<Foo>() or flux.ofType(Foo::class)
StepVerifier.create(flux).verifyComplete() flux.test().verifyComplete()

Introducing Kotlin support in Spring Framework 5.0

Engineering | January 04, 2017 | ...

Update: a comprehensive Spring Boot + Kotlin tutorial is now available.

Following the Kotlin support on start.spring.io we introduced a few months ago, we have continued to work to ensure that Spring and Kotlin play well together. One of the key strengths of Kotlin is that it provides a very good interoperability with libraries written in Java. But there are ways to go even further and allow writing fully idiomatic Kotlin code when developing your next Spring application. In addition to Spring Framework support for Java 8 that Kotlin applications can leverage like functional web or bean…

Understanding Reactive types

Engineering | April 19, 2016 | ...

Following previous Reactive Spring and Reactor Core 3.0 blog posts, I would like to explain why Reactive types are useful and how they compare to other asynchronous types, based on what we have learned while working on the Spring Framework 5 upcoming Reactive support.

Why using Reactive types?

Reactive types are not intended to allow you to process your requests or data faster, in fact they will introduce a small overhead compared to regular blocking processing. Their strength lies in their capacity to serve more request concurrently, and to handle operations with latency, such as requesting…

A Geospatial Messenger with Kotlin, Spring Boot and PostgreSQL

Engineering | March 20, 2016 | ...

Following my first Kotlin blog post, today I want introduce the new Spring Boot + Kotlin application I have developed for my upcoming Spring I/O 2016 conference talk "Developing Geospatial Web Services with Kotlin and Spring Boot".

Dealing with native database functionalities

One of the goal of this application is to see how to take advantage of native database functionalities like we do in NoSQL world. Here we want to use Geospatial support provided by PostGIS, the spatial database extender for PostgreSQL. Native JSON support could also be a good use case.

This Geospatial Messenger sample application is available on GitHub

Developing Spring Boot applications with Kotlin

Engineering | February 15, 2016 | ...

Update: a comprehensive Spring Boot + Kotlin tutorial is now available.

Just in time for Kotlin 1.0 release, we are adding support for Kotlin language to https://start.spring.io in order to make it easier to start new Spring Boot projects with this language.

This blog post is also an opportunity for me to explain why I find this language interesting, to show you a sample project in detail and to give you some tips.

What is Kotlin?

Kotlin is a language created by JetBrains. It runs on top of the JVM (but not only), it is an object oriented language that includes many ideas from functional programming. I won't go too much in details about all Kotlin features (PDF, HTML

CORS support in Spring Framework

Engineering | June 08, 2015 | ...

For security reasons, browsers prohibit AJAX calls to resources residing outside the current origin. For example, as you're checking your bank account in one tab, you could have the evil.com website in another tab. The scripts from evil.com shouldn’t be able to make AJAX requests to your bank API (withdrawing money from your account!) using your credentials.

Cross-origin resource sharing (CORS) is a W3C specification implemented by most browsers that allows you to specify in a flexible way what kind of cross domain requests are authorized, instead of using some less secured and less powerful…

Get ahead

VMware offers training and certification to turbo-charge your progress.

Learn more

Get support

Tanzu Spring offers support and binaries for OpenJDK™, Spring, and Apache Tomcat® in one simple subscription.

Learn more

Upcoming events

Check out all the upcoming events in the Spring community.

View all