<@U48M2JAN6> this example works for me ```@Configu...
# spring
f
@strelok this example works for me
Copy code
@Configuration
@SpringBootApplication
class DemoApplication {
    @Bean
    fun stringBean() : String? = null
}

@Component
class Runner(val whatever: Whatever) : CommandLineRunner {
    override fun run(vararg p0: String?) {
        whatever.hello()
    }
}

fun main(args: Array<String>) {
    SpringApplication.run(DemoApplication::class.java, *args)
}


@Component
class Whatever(val thing: String?) {
    fun hello() = println("hello ${thing ?: "world"}")
}