Ktor/透过 exposed 串接资料库
< Ktor
安装
编辑build.gradle 加上以下两段
repositories {
mavenLocal()
jcenter()
maven { url 'https://kotlin.bintray.com/ktor' }
maven { url 'https://kotlin.bintray.com/kotlin-js-wrappers' }
maven { url "https://dl.bintray.com/kotlin/exposed" }
}
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
implementation "io.ktor:ktor-server-netty:$ktor_version"
implementation "ch.qos.logback:logback-classic:$logback_version"
implementation "io.ktor:ktor-server-core:$ktor_version"
implementation "io.ktor:ktor-client-core:$ktor_version"
implementation "io.ktor:ktor-client-core-jvm:$ktor_version"
compile("org.jetbrains.exposed:exposed:0.3.2")
implementation "io.ktor:ktor-jackson:$ktor_version"
testImplementation "io.ktor:ktor-server-tests:$ktor_version"
}
等待自动汇入之后就可以了