@Bean
fun printBeanNames(context: ApplicationContext): CommandLineRunner {
    return CommandLineRunner {
        println("beans: " + context.beanDefinitionNames.joinToString(", "))
    }
}

spring