Support AnnotationConfigApplicationContext{} in Kotlin
Issue: SPR-15126
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
package org.springframework.context.annotation
|
||||
|
||||
/**
|
||||
* Extension for [AnnotationConfigApplicationContext] providing
|
||||
* `AnnotationConfigApplicationContext { }` style initialization.
|
||||
*
|
||||
* @author Sebastien Deleuze
|
||||
* @since 5.0
|
||||
*/
|
||||
object AnnotationConfigApplicationContextExtension {
|
||||
|
||||
fun AnnotationConfigApplicationContext(configure: AnnotationConfigApplicationContext.()->Unit) =
|
||||
AnnotationConfigApplicationContext().apply(configure)
|
||||
}
|
||||
Reference in New Issue
Block a user