update project

This commit is contained in:
2025-07-29 12:45:59 +02:00
parent 07aad8b796
commit 0f7d5b9feb
6 changed files with 21 additions and 23 deletions

View File

@@ -1,13 +1,12 @@
import com.bmuschko.gradle.docker.tasks.container.DockerCreateContainer
import java.lang.System.getenv
plugins {
alias(hlaeja.plugins.com.bmuschko.docker)
alias(hlaeja.plugins.gradle.docker)
alias(hlaeja.plugins.kotlin.jvm)
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.springframework.boot)
alias(hlaeja.plugins.service)
}
dependencies {
@@ -15,7 +14,7 @@ dependencies {
implementation(hlaeja.kotlin.logging)
implementation(hlaeja.kotlin.reflect)
implementation(hlaeja.kotlinx.coroutines)
implementation(hlaeja.library.hlaeja.common.messages)
implementation(hlaeja.library.common.messages)
implementation(hlaeja.springboot.starter.actuator)
implementation(hlaeja.springboot.starter.webflux)
@@ -30,11 +29,7 @@ dependencies {
group = "ltd.hlaeja"
fun influxDbToken(): String = if (extra.has("influxdb.token")) {
extra["influxdb.token"] as String
} else {
getenv("INFLUXDB_TOKEN") ?: "missing_token"
}
fun influxDbToken(): String = config.findOrDefault("influxdb.token", "INFLUXDB_TOKEN", "missing_token")
tasks {
named("containerCreate", DockerCreateContainer::class) {

View File

@@ -1,4 +1,4 @@
kotlin.code.style=official
version=0.2.0-SNAPSHOT
catalog=0.6.0
catalog=0.11.0-SNAPSHOT
container.port.host=9020

View File

@@ -1,10 +1,10 @@
package ltd.hlaeja.service
import com.influxdb.client.write.Point
import io.github.oshai.kotlinlogging.KotlinLogging
import java.util.UUID
import ltd.hlaeja.library.deviceData.MeasurementData
import ltd.hlaeja.repository.MeasurementRepository
import mu.KotlinLogging
import org.springframework.http.HttpStatus.NOT_FOUND
import org.springframework.stereotype.Service
import org.springframework.web.server.ResponseStatusException

View File

@@ -10,6 +10,20 @@ spring:
name: "%APP_BUILD_OS_NAME%"
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:
bucket: device-data
org: hlaeja_ltd

View File

@@ -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>