This commit is contained in:
parent
4825f54c89
commit
9cfaf5857b
14
build.gradle
14
build.gradle
@ -39,13 +39,13 @@ repositories {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
compile 'org.postgresql:postgresql:42.2.2'
|
compile 'org.postgresql:postgresql:42.2.23'
|
||||||
compile 'org.jetbrains.exposed:exposed-core:0.23.1'
|
compile 'org.jetbrains.exposed:exposed-core:0.32.1'
|
||||||
compile 'org.jetbrains.exposed:exposed-dao:0.23.1'
|
compile 'org.jetbrains.exposed:exposed-dao:0.32.1'
|
||||||
compile 'org.jetbrains.exposed:exposed-jdbc:0.23.1'
|
compile 'org.jetbrains.exposed:exposed-jdbc:0.33.1'
|
||||||
compile 'org.jetbrains.exposed:exposed-java-time:0.23.1'
|
compile 'org.jetbrains.exposed:exposed-java-time:0.33.1'
|
||||||
compile 'com.rabbitmq:amqp-client:2.7.1'
|
compile 'com.rabbitmq:amqp-client:5.13.0'
|
||||||
compile 'com.zaxxer:HikariCP:2.7.8'
|
compile 'com.zaxxer:HikariCP:5.0.0'
|
||||||
compile 'com.viartemev:the-white-rabbit:0.0.5'
|
compile 'com.viartemev:the-white-rabbit:0.0.5'
|
||||||
implementation "org.koin:koin-ktor:$koin_version"
|
implementation "org.koin:koin-ktor:$koin_version"
|
||||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk8:$kotlin_version"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
ktor_version=1.4.2
|
ktor_version=1.6.2
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
kotlin_version=1.4.10
|
kotlin_version=1.4.10
|
||||||
logback_version=1.2.1
|
logback_version=1.2.1
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: ConfigMap
|
kind: ConfigMap
|
||||||
metadata:
|
metadata:
|
||||||
name: output-service-rdb-config
|
name: sample-service-config
|
||||||
labels:
|
labels:
|
||||||
app: output-service-rdb
|
app: sample-service
|
||||||
namespace: birbnetes
|
namespace: birbnetes
|
||||||
data:
|
data:
|
||||||
PORT: "8080"
|
PORT: "8080"
|
||||||
DB_URL: "jdbc:postgresql://output-postgres:5432/output-service"
|
DB_URL: "jdbc:postgresql://sample-postgres:5432/sample-service"
|
||||||
DB_USER: output-service
|
DB_USER: sample-service
|
||||||
DB_PASSWORD: output-service-supersecret
|
DB_PASSWORD: sample-service-supersecret
|
||||||
MQ_HOST: birb-rabbitmq
|
MQ_HOST: birb-rabbitmq
|
||||||
MQ_USERNAME: user
|
MQ_USERNAME: user
|
||||||
MQ_PASSWORD: F3ACadDRsT
|
MQ_PASSWORD: F3ACadDRsT
|
||||||
|
@ -1,29 +1,29 @@
|
|||||||
apiVersion: apps/v1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: output-service-rdb
|
name: sample-service
|
||||||
namespace: birbnetes
|
namespace: birbnetes
|
||||||
labels:
|
labels:
|
||||||
app: output-service-rdb
|
app: sample-service
|
||||||
spec:
|
spec:
|
||||||
replicas: 1
|
replicas: 1
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: output-service-rdb
|
app: sample-service
|
||||||
strategy:
|
strategy:
|
||||||
type: Recreate
|
type: Recreate
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: output-service-rdb
|
app: sample-service
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- image: registry.kmlabz.com/birbnetes/output-service-rdb
|
- image: registry.kmlabz.com/birbnetes/sample-service
|
||||||
imagePullPolicy: Always
|
imagePullPolicy: Always
|
||||||
name: output-service-rdb
|
name: sample-service
|
||||||
envFrom:
|
envFrom:
|
||||||
- configMapRef:
|
- configMapRef:
|
||||||
name: output-service-rdb-config
|
name: sample-service-config
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
imagePullSecrets:
|
imagePullSecrets:
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: output-service-rdb
|
name: sample-service
|
||||||
namespace: birbnetes
|
namespace: birbnetes
|
||||||
labels:
|
labels:
|
||||||
app: output-service-rdb
|
app: sample-service
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: output-service-rdb
|
- name: sample-service
|
||||||
port: 80
|
port: 80
|
||||||
targetPort: 8080
|
targetPort: 8080
|
||||||
protocol: TCP
|
protocol: TCP
|
||||||
selector:
|
selector:
|
||||||
app: output-service-rdb
|
app: sample-service
|
||||||
type: ClusterIP
|
type: ClusterIP
|
@ -29,7 +29,7 @@ class OutputServiceRDBServer {
|
|||||||
val dateAfter = call.parameters["dateAfter"] ?: error(HttpStatusCode.NotAcceptable)
|
val dateAfter = call.parameters["dateAfter"] ?: error(HttpStatusCode.NotAcceptable)
|
||||||
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE
|
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE
|
||||||
val localDateAfter : LocalDate = LocalDate.parse(dateAfter,dateTimeFormatter)
|
val localDateAfter : LocalDate = LocalDate.parse(dateAfter,dateTimeFormatter)
|
||||||
val resultList = resultObjectService.getSampleObjectafterDate(localDateAfter) ?: call.respond(HttpStatusCode.NotFound)
|
val resultList = resultObjectService.getSampleObjectafterDate(localDateAfter)
|
||||||
|
|
||||||
call.respond(resultList)
|
call.respond(resultList)
|
||||||
}
|
}
|
||||||
@ -38,7 +38,7 @@ class OutputServiceRDBServer {
|
|||||||
val dateAfter = call.parameters["dateBefore"] ?: error(HttpStatusCode.NotAcceptable)
|
val dateAfter = call.parameters["dateBefore"] ?: error(HttpStatusCode.NotAcceptable)
|
||||||
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE
|
val dateTimeFormatter: DateTimeFormatter = DateTimeFormatter.ISO_LOCAL_DATE
|
||||||
val localDateBefore : LocalDate = LocalDate.parse(dateAfter,dateTimeFormatter)
|
val localDateBefore : LocalDate = LocalDate.parse(dateAfter,dateTimeFormatter)
|
||||||
val resultList = resultObjectService.getSampleObjectbeforeDate(localDateBefore) ?: call.respond(HttpStatusCode.NotFound)
|
val resultList = resultObjectService.getSampleObjectbeforeDate(localDateBefore)
|
||||||
|
|
||||||
call.respond(resultList)
|
call.respond(resultList)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user