Spring WebFlux 和 Kotlin 支持:如何进行集成测试?
Spring WebFlux and Kotlin Support: How to do Integration Tests?
https://docs.spring.io/spring-framework/docs/5.0.0.BUILD-SNAPSHOT/spring-framework-reference/kotlin.html#easy-testing-kotlin-and-junit-5 显示了集成测试的代码示例。但是我不明白这一行:
val application = Application(8181)
8181
应该是端口号。但是 Application
是从哪里来的呢?这是 Spring Boot 应用程序的应用程序 class 吗?
教程的代码包含在那里。简而言之:Application
是您项目的 class,但只需签出项目 https://github.com/sdeleuze/spring-kotlin-functional
https://docs.spring.io/spring-framework/docs/5.0.0.BUILD-SNAPSHOT/spring-framework-reference/kotlin.html#easy-testing-kotlin-and-junit-5 显示了集成测试的代码示例。但是我不明白这一行:
val application = Application(8181)
8181
应该是端口号。但是 Application
是从哪里来的呢?这是 Spring Boot 应用程序的应用程序 class 吗?
教程的代码包含在那里。简而言之:Application
是您项目的 class,但只需签出项目 https://github.com/sdeleuze/spring-kotlin-functional