This commit is contained in:
parent
ac4e01b1e9
commit
9c432ae60d
@ -7,7 +7,6 @@ buildscript {
|
|||||||
dependencies {
|
dependencies {
|
||||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||||
classpath "com.github.jengelman.gradle.plugins:shadow:5.2.0"
|
classpath "com.github.jengelman.gradle.plugins:shadow:5.2.0"
|
||||||
classpath "org.koin:koin-gradle-plugin:$koin_version"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -19,7 +18,6 @@ tasks.withType(JavaCompile) {
|
|||||||
apply plugin: 'kotlin'
|
apply plugin: 'kotlin'
|
||||||
apply plugin: "com.github.johnrengelman.shadow"
|
apply plugin: "com.github.johnrengelman.shadow"
|
||||||
apply plugin: 'application'
|
apply plugin: 'application'
|
||||||
apply plugin: 'koin'
|
|
||||||
|
|
||||||
group 'com.kmalbz'
|
group 'com.kmalbz'
|
||||||
version '0.0.1'
|
version '0.0.1'
|
||||||
@ -45,7 +43,8 @@ dependencies {
|
|||||||
compile 'org.jetbrains.exposed:exposed-jdbc:0.33.1'
|
compile 'org.jetbrains.exposed:exposed-jdbc:0.33.1'
|
||||||
compile 'org.jetbrains.exposed:exposed-java-time:0.33.1'
|
compile 'org.jetbrains.exposed:exposed-java-time:0.33.1'
|
||||||
compile 'com.zaxxer:HikariCP:5.0.0'
|
compile 'com.zaxxer:HikariCP:5.0.0'
|
||||||
implementation "org.koin:koin-ktor:$koin_version"
|
implementation "io.insert-koin:koin-core:$koin_version"
|
||||||
|
implementation "io.insert-koin:koin-ktor:$koin_version"
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
implementation "io.ktor:ktor-server-netty:$ktor_version"
|
implementation "io.ktor:ktor-server-netty:$ktor_version"
|
||||||
implementation "ch.qos.logback:logback-classic:$logback_version"
|
implementation "ch.qos.logback:logback-classic:$logback_version"
|
||||||
|
@ -2,4 +2,4 @@ ktor_version=1.6.2
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin_version=1.5.21
|
kotlin_version=1.5.21
|
||||||
logback_version=1.2.5
|
logback_version=1.2.5
|
||||||
koin_version=2.2.2
|
koin_version=3.1.2
|
@ -20,7 +20,7 @@ class OutputServiceRDBServer {
|
|||||||
* output
|
* output
|
||||||
*/
|
*/
|
||||||
fun Routing.registerOutput() {
|
fun Routing.registerOutput() {
|
||||||
val resultObjectService by inject<IResultObjectService>()
|
val resultObjectService:IResultObjectService by inject()
|
||||||
get("/output"){
|
get("/output"){
|
||||||
call.respond(resultObjectService.getAllResultObjects())
|
call.respond(resultObjectService.getAllResultObjects())
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,7 @@ package com.kmalbz.di
|
|||||||
import com.kmalbz.database.service.IResultObjectService
|
import com.kmalbz.database.service.IResultObjectService
|
||||||
import com.kmalbz.database.service.ResultObjectService
|
import com.kmalbz.database.service.ResultObjectService
|
||||||
import org.koin.dsl.module
|
import org.koin.dsl.module
|
||||||
import org.koin.experimental.builder.singleBy
|
|
||||||
|
|
||||||
val injectionModule = module(createdAtStart = true) {
|
val injectionModule = module(createdAtStart = true) {
|
||||||
singleBy<IResultObjectService,ResultObjectService>()
|
single<IResultObjectService> {ResultObjectService()}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user