java - 如何获得修复此错误的 Stacktrace?
问题描述
嘿,我尝试在 Kotlin Hands 上使用 Ktor。但是使用“/”访问网页时出现问题。
embeddedServer(Netty, port) {
install(FreeMarker) {
templateLoader = ClassTemplateLoader(this::class.java.classLoader, "templates")
outputFormat = HTMLOutputFormat.INSTANCE
}
routing {
static("/static") {
resources("files")
}
get("/") {
call.respond(FreeMarkerContent("index.ftl", mapOf("entries" to blogEntries), ""))
}
}
}.start(wait = false)
我使用了我的代码。我找不到错误,控制台中只有这条消息:
[eventLoopGroupProxy-4-1] INFO ktor.application - Unhandled: GET - /, io failed
有谁知道我该如何解决这个错误?
解决方案
我建议使用CallLogging功能和路由跟踪来解决您的问题。
推荐阅读
- asp.net - 将 asp.net mvc 转换为剃须刀页面
- c++ - kadanes算法中的错误答案
- php - 如何使用 PHP 在 JSON 对象中正确创建和附加数据?
- powershell - 在 add_click 中使用 powershell 命令
- angular - 获取请求类型错误:这是未定义的
- datastax - Datastax 企业版是否可以在生产环境中免费使用?
- android - 在 ViewFlipper 中使用位图
- redirect - 302 重定向在 nginx 反向代理后面不起作用
- amazon-web-services - 通过 Lambda 使用 2 个输入创建 ElasticTranscoder 作业
- jquery - 为事件 jQuery 选择特定的新附加节点副本