At https://github.com/spring-projects/spring-framework/blob/master/spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt the comment shows how
Another way to do it in Spring Boot would be :
fun main(args: Array) { runApplication(*args) { addInitializers( beans { // Define your bean with Kotlin DSL here } ) } }