2021-08-17 17:22:06 +02:00
|
|
|
import database.DatabaseFactory
|
|
|
|
import database.dao.SampleObjects
|
2021-08-13 14:19:40 +02:00
|
|
|
import di.databasemodule
|
|
|
|
import mq.ConsumerWrapper
|
2021-08-17 17:22:06 +02:00
|
|
|
import org.jetbrains.exposed.sql.SchemaUtils
|
|
|
|
import org.jetbrains.exposed.sql.transactions.transaction
|
2021-08-13 14:19:40 +02:00
|
|
|
import org.koin.core.context.GlobalContext.startKoin
|
|
|
|
|
|
|
|
fun main(vararg args: String) {
|
|
|
|
|
|
|
|
startKoin {
|
|
|
|
printLogger()
|
|
|
|
modules(databasemodule)
|
|
|
|
}
|
|
|
|
|
2021-08-17 17:22:06 +02:00
|
|
|
DatabaseFactory.init()
|
|
|
|
transaction{
|
|
|
|
SchemaUtils.create(SampleObjects)
|
|
|
|
}
|
|
|
|
|
2021-08-13 14:19:40 +02:00
|
|
|
val consumerWrapper = ConsumerWrapper();
|
|
|
|
consumerWrapper.recieve();
|
|
|
|
}
|