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应用程序的应用程序类吗?
1 回答
看看https://github.com/sdeleuze/spring-kotlin-functional/blob/master/src/test/kotlin/functional/IntegrationTests.kt
本教程的代码包含在那里 . 简而言之:
Application
是你的项目的一类,但只是结帐项目https://github.com/sdeleuze/spring-kotlin-functional