-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Closed
Labels
theme: kotlinAn issue related to Kotlin supportAn issue related to Kotlin supporttype: documentationA documentation taskA documentation task
Milestone
Description
https://docs.spring.io/spring-framework/docs/current/reference/html/core.html#beans-some-examples
kotlin changed to:
class ExampleBean private constructor() {
companion object {
// a static factory method; the arguments to this method can be
// considered the dependencies of the bean that is returned,
// regardless of how those arguments are actually used.
@JvmStatic
fun createInstance(anotherBean: AnotherBean, yetAnotherBean: YetAnotherBean, i: Int): ExampleBean {
val eb = ExampleBean (...)
// some other operations...
return eb
}
}
}
Metadata
Metadata
Assignees
Labels
theme: kotlinAn issue related to Kotlin supportAn issue related to Kotlin supporttype: documentationA documentation taskA documentation task