Skip to content

Example of migration from Java project on Spring Boot 1.5 to Kotlin, Spring boot 2, JUnit 5, and after to Spring-webflux. Also from Groovy Dsl to Kotlin Dsl in Gradle. Code for blog post at https://habr.com/ru/company/alfa/blog/340942/

Notifications You must be signed in to change notification settings

evgzakharov/big_migration

Repository files navigation

travis image

Example of migration step by step to new technologies

Example of migration from Java project on Spring Boot 1.5 to Kotlin, Spring Boot 2 and after to Spring-webflux. And From Groovy Dsl to Kotlin Dsl in Gradle

Step 1

Simple project on Java and Spring Boot 1.5 with two controllers, service and in-memory repository. Project build by Groovy Dsl in Gradle

Step 2

Migrate to Spring Boot 2 and Junit 5. Main difference appears in tests and dependencies in build.gradle.

Step 3

Convert code to Kotlin, mostly by Intellij Idea and after clean code to Kotlin style. For mocking add mockito-kotlin library

Step 4

Convert code to webflux. For base project take this. Add several BeanPostProcessors to process spring annotations and add manual config loading. For the reason that yml processing classes I have found only in spring-boot-starter, it's needed to include this dependency to build.gradle

Step 5

Convert Gradle Dsl to Kotlin Dsl. For now worked only if moving Kotlin plugin to new Gradle plugin syntax.

About

Example of migration from Java project on Spring Boot 1.5 to Kotlin, Spring boot 2, JUnit 5, and after to Spring-webflux. Also from Groovy Dsl to Kotlin Dsl in Gradle. Code for blog post at https://habr.com/ru/company/alfa/blog/340942/

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published