connect to db
This commit is contained in:
parent
c6d2b85876
commit
df13c145e7
@ -1,5 +1,9 @@
|
|||||||
|
import database.DatabaseFactory
|
||||||
|
import database.dao.ResultObjects
|
||||||
import di.databasemodule
|
import di.databasemodule
|
||||||
import mq.ConsumerWrapper
|
import mq.ConsumerWrapper
|
||||||
|
import org.jetbrains.exposed.sql.SchemaUtils
|
||||||
|
import org.jetbrains.exposed.sql.transactions.transaction
|
||||||
import org.koin.core.context.GlobalContext.startKoin
|
import org.koin.core.context.GlobalContext.startKoin
|
||||||
|
|
||||||
fun main(vararg args: String) {
|
fun main(vararg args: String) {
|
||||||
@ -9,6 +13,11 @@ fun main(vararg args: String) {
|
|||||||
modules(databasemodule)
|
modules(databasemodule)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DatabaseFactory.init()
|
||||||
|
transaction{
|
||||||
|
SchemaUtils.create(ResultObjects)
|
||||||
|
}
|
||||||
|
|
||||||
val consumerWrapper = ConsumerWrapper();
|
val consumerWrapper = ConsumerWrapper();
|
||||||
consumerWrapper.recieve();
|
consumerWrapper.recieve();
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user