update project
This commit is contained in:
@@ -1,13 +1,12 @@
|
|||||||
import com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer
|
import com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer
|
||||||
import java.lang.System.getenv
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
alias(hlaeja.plugins.com.bmuschko.docker)
|
alias(hlaeja.plugins.gradle.docker)
|
||||||
alias(hlaeja.plugins.kotlin.jvm)
|
alias(hlaeja.plugins.kotlin.jvm)
|
||||||
alias(hlaeja.plugins.kotlin.spring)
|
alias(hlaeja.plugins.kotlin.spring)
|
||||||
alias(hlaeja.plugins.ltd.hlaeja.plugin.service)
|
alias(hlaeja.plugins.spring.boot)
|
||||||
alias(hlaeja.plugins.spring.dependency.management)
|
alias(hlaeja.plugins.spring.dependency.management)
|
||||||
alias(hlaeja.plugins.springframework.boot)
|
alias(hlaeja.plugins.service)
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
@@ -15,7 +14,7 @@ dependencies {
|
|||||||
implementation(hlaeja.kotlin.logging)
|
implementation(hlaeja.kotlin.logging)
|
||||||
implementation(hlaeja.kotlin.reflect)
|
implementation(hlaeja.kotlin.reflect)
|
||||||
implementation(hlaeja.kotlinx.coroutines)
|
implementation(hlaeja.kotlinx.coroutines)
|
||||||
implementation(hlaeja.library.hlaeja.common.messages)
|
implementation(hlaeja.library.common.messages)
|
||||||
implementation(hlaeja.springboot.starter.actuator)
|
implementation(hlaeja.springboot.starter.actuator)
|
||||||
implementation(hlaeja.springboot.starter.webflux)
|
implementation(hlaeja.springboot.starter.webflux)
|
||||||
|
|
||||||
@@ -30,11 +29,7 @@ dependencies {
|
|||||||
|
|
||||||
group = "ltd.hlaeja"
|
group = "ltd.hlaeja"
|
||||||
|
|
||||||
fun influxDbToken(): String = if (extra.has("influxdb.token")) {
|
fun influxDbToken(): String = config.findOrDefault("influxdb.token", "INFLUXDB_TOKEN", "missing_token")
|
||||||
extra["influxdb.token"] as String
|
|
||||||
} else {
|
|
||||||
getenv("INFLUXDB_TOKEN") ?: "missing_token"
|
|
||||||
}
|
|
||||||
|
|
||||||
tasks {
|
tasks {
|
||||||
named("containerCreate", DockerCreateContainer::class) {
|
named("containerCreate", DockerCreateContainer::class) {
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
version=0.2.0-SNAPSHOT
|
version=0.2.0-SNAPSHOT
|
||||||
catalog=0.6.0
|
catalog=0.11.0-SNAPSHOT
|
||||||
container.port.host=9020
|
container.port.host=9020
|
||||||
|
|||||||
@@ -1,10 +1,10 @@
|
|||||||
package ltd.hlaeja.service
|
package ltd.hlaeja.service
|
||||||
|
|
||||||
import com.influxdb.client.write.Point
|
import com.influxdb.client.write.Point
|
||||||
|
import io.github.oshai.kotlinlogging.KotlinLogging
|
||||||
import java.util.UUID
|
import java.util.UUID
|
||||||
import ltd.hlaeja.library.deviceData.MeasurementData
|
import ltd.hlaeja.library.deviceData.MeasurementData
|
||||||
import ltd.hlaeja.repository.MeasurementRepository
|
import ltd.hlaeja.repository.MeasurementRepository
|
||||||
import mu.KotlinLogging
|
|
||||||
import org.springframework.http.HttpStatus.NOT_FOUND
|
import org.springframework.http.HttpStatus.NOT_FOUND
|
||||||
import org.springframework.stereotype.Service
|
import org.springframework.stereotype.Service
|
||||||
import org.springframework.web.server.ResponseStatusException
|
import org.springframework.web.server.ResponseStatusException
|
||||||
|
|||||||
@@ -10,6 +10,20 @@ spring:
|
|||||||
name: "%APP_BUILD_OS_NAME%"
|
name: "%APP_BUILD_OS_NAME%"
|
||||||
version: "%APP_BUILD_OS_VERSION%"
|
version: "%APP_BUILD_OS_VERSION%"
|
||||||
|
|
||||||
|
management:
|
||||||
|
endpoints:
|
||||||
|
access:
|
||||||
|
default: none
|
||||||
|
web:
|
||||||
|
exposure:
|
||||||
|
include: "health,info"
|
||||||
|
endpoint:
|
||||||
|
health:
|
||||||
|
show-details: always
|
||||||
|
access: read_only
|
||||||
|
info:
|
||||||
|
access: read_only
|
||||||
|
|
||||||
influxdb:
|
influxdb:
|
||||||
bucket: device-data
|
bucket: device-data
|
||||||
org: hlaeja_ltd
|
org: hlaeja_ltd
|
||||||
|
|||||||
@@ -1,11 +0,0 @@
|
|||||||
<configuration>
|
|
||||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
|
||||||
<encoder>
|
|
||||||
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
|
|
||||||
</encoder>
|
|
||||||
</appender>
|
|
||||||
<root level="INFO">
|
|
||||||
<appender-ref ref="STDOUT"/>
|
|
||||||
</root>
|
|
||||||
<logger level="DEBUG" name="ltd.hlaeja"/>
|
|
||||||
</configuration>
|
|
||||||
Reference in New Issue
Block a user