Skip to content

Commit 14cba15

Browse files
committed
Open router and bean Kotlin DSL to allow building custom ones
1 parent 96bbd18 commit 14cba15

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

spring-context/src/main/kotlin/org/springframework/context/support/BeanDefinitionDsl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ fun beans(init: BeanDefinitionDsl.() -> Unit): BeanDefinitionDsl {
7676
* @author Sebastien Deleuze
7777
* @since 5.0
7878
*/
79-
class BeanDefinitionDsl(private val condition: (ConfigurableEnvironment) -> Boolean = { true }) : ApplicationContextInitializer<GenericApplicationContext> {
79+
open class BeanDefinitionDsl(private val condition: (ConfigurableEnvironment) -> Boolean = { true }) : ApplicationContextInitializer<GenericApplicationContext> {
8080

8181
@PublishedApi
8282
internal val registrations = arrayListOf<(GenericApplicationContext) -> Unit>()

spring-webflux/src/main/kotlin/org/springframework/web/reactive/function/server/RouterFunctionDsl.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ fun router(routes: RouterFunctionDsl.() -> Unit) = RouterFunctionDsl().apply(rou
6060
* @since 5.0
6161
* @see <a href="https://youtrack.jetbrains.com/issue/KT-15667">Kotlin issue about supporting ::foo for member functions</a>
6262
*/
63-
class RouterFunctionDsl {
63+
open class RouterFunctionDsl {
6464

6565
private val routes = mutableListOf<RouterFunction<ServerResponse>>()
6666

0 commit comments

Comments
 (0)