Jamy
01/21/2023, 1:00 PM/, segment:0 -> SUCCESS @ /
/(method:GET), segment:0 -> FAILURE "Not all segments matched" @ /(method:GET)
/error, segment:0 -> FAILURE "Selector didn't match" @ /error
Matched routes:
No results
Route resolve result:
FAILURE "No matched subtrees found" @ /
Aleksei Tirman [JB]
01/23/2023, 7:55 AMJamy
01/23/2023, 8:53 AMJamy
01/23/2023, 8:55 AMAleksei Tirman [JB]
01/23/2023, 8:56 AMAleksei Tirman [JB]
01/23/2023, 8:57 AMJamy
01/23/2023, 9:00 AMJamy
01/23/2023, 9:01 AMJamy
01/23/2023, 9:02 AMJamy
01/23/2023, 9:12 AMget("/something") {
call.respond(HttpStatusCode.NotFound)
}
Jamy
01/23/2023, 9:40 AMJamy
01/23/2023, 10:07 AM./gradlew :jettyRun
you can reproduce the problem.
But if you launch the project via the main function in the IDE, then the behavior will be normal.Aleksei Tirman [JB]
01/23/2023, 10:27 AMServletApplicationEngine
. As a workaround, please add the following code in the Application.module
definition:
fun Application.module() {
intercept(ApplicationCallPipeline.Fallback) {
if (call.isHandled) return@intercept
val status = call.response.status() ?: HttpStatusCode.NotFound
call.respond(status)
}
configureRouting()
}
Jamy
01/23/2023, 11:02 AMAleksei Tirman [JB]
01/23/2023, 11:34 AMAleksei Tirman [JB]
01/23/2023, 4:11 PM