1

Remove Session module

This commit is contained in:
2018-05-04 17:52:37 +03:00
parent fb4baec57f
commit 76512ee32e
11 changed files with 19 additions and 45 deletions

View File

@@ -1,9 +1,8 @@
import com.devsoap.dbt.DBTModule
import com.devsoap.dbt.demo.DatabaseService
import com.devsoap.dbt.config.DBTConfig
import com.devsoap.dbt.demo.DatabaseService
import com.devsoap.dbt.services.TransactionManagerService
import org.h2.jdbcx.JdbcDataSource
import ratpack.session.SessionModule
import javax.sql.DataSource
@@ -17,8 +16,6 @@ ratpack {
}
bindings {
module SessionModule
module (DBTModule) {
it.ledger.remoteUrl = 'http://localhost:5050/ledger'
it.executor.remoteUrl = 'http://localhost:5050/executor'
@@ -33,7 +30,7 @@ ratpack {
/**
* Consumer services
*/
get('frontend') {
get('') {
get(TransactionManagerService).execute { transaction ->
transaction.query("INSERT INTO LOGS(LOG_ID,LOG_VALUE) VALUES (${new Random().nextInt()}, 'HELLO')")
}.then {
@@ -54,7 +51,7 @@ ratpack {
transaction.query("SELECT * FROM LOGS")
transaction.complete()
}).then {
render it.toString()
redirect('/ledger')
}
}
}