**[Sébastien Deleuze](https://jira.spring.io/secure/ViewProfile.jspa?name=sdeleuze)** opened **[SPR-15126](https://jira.spring.io/browse/SPR-15126?redirect=false)** and commented Based on a feedback from Ilya Ryzhenkov (Kotlin team), it is possible to support this kind of Gradle-style Kotlin API for bean registration: ``` val context = GenericApplicationContext { registerBean<Foo>() registerBean { Bar(it.getBean<Foo>()) } } ``` --- **Referenced from:** commits https://github.com/spring-projects/spring-framework/commit/8f14e29067d51b80aa4cc9562b41b7b1260e4ac8, https://github.com/spring-projects/spring-framework/commit/f8461d856ae6f9e47736a5d8b93c15472f8433b7