You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
csamsserver/src/TestController.kt

20 lines
553 B

package com.gyf.csams
import io.ktor.application.*
import io.ktor.response.*
import io.ktor.routing.*
import org.jetbrains.exposed.sql.transactions.transaction
import org.slf4j.LoggerFactory
private val logger = LoggerFactory.getLogger(Application::class.java)
fun Application.TestController(){
routing {
get("$ApiPathPrefix/test"){
transaction {
logger.info("查询到个${User.count()}用户")
}
call.respond(ApiResponse(message = "成功连接服务端",body=true))
}
}
}