Spring Boot¶
stove-spring is the starter for applications built on Spring Boot. It supports bridge() for direct bean access in tests.
Dependency¶
dependencies {
testImplementation(platform("com.trendyol:stove-bom:$version"))
testImplementation("com.trendyol:stove")
testImplementation("com.trendyol:stove-spring")
}
Application Entrypoint¶
Expose a reusable run(args, init) function so Stove can call the real app entrypoint:
@SpringBootApplication
class ExampleApp
fun main(args: Array<String>) {
run(args)
}
fun run(
args: Array<String>,
init: SpringApplication.() -> Unit = {}
): ConfigurableApplicationContext = runApplication<ExampleApp>(*args, init = init)
Minimal Stove Setup¶
Stove()
.with {
springBoot(
runner = { params -> run(params) },
withParameters = listOf("server.port=8080")
)
}
.run()
What You Get¶
- Spring Boot startup through the real application entrypoint
bridge()support for bean access- full access to Stove components such as PostgreSQL, Kafka, WireMock, HTTP, and tracing