parent
741d966170
commit
f363d7966b
@ -1,5 +1,5 @@ |
||||
distributionBase=GRADLE_USER_HOME |
||||
distributionPath=wrapper/dists |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-6.6.1-all.zip |
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.0.2-all.zip |
||||
zipStoreBase=GRADLE_USER_HOME |
||||
zipStorePath=wrapper/dists |
||||
|
@ -0,0 +1,20 @@ |
||||
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)) |
||||
} |
||||
} |
||||
} |
Loading…
Reference in new issue