Compare commits
5 Commits
bfd301e3a5
...
f2207e8667
Author | SHA1 | Date |
---|---|---|
Hannes Braun | f2207e8667 | |
Hannes Braun | 5ee4748e42 | |
Hannes Braun | 5dd11bbe6c | |
Hannes Braun | 25390e2132 | |
Hannes Braun | bc7d6e5146 |
|
@ -1,4 +1,4 @@
|
|||
FROM adoptopenjdk/openjdk11:alpine-jre
|
||||
FROM eclipse-temurin:21-jre-alpine
|
||||
RUN addgroup -S spring && adduser -S spring -G spring
|
||||
#RUN groupadd -r spring && useradd -r -g spring spring # for openjdk:xx builds
|
||||
RUN mkdir /tcor && chown spring:spring /tcor
|
||||
|
|
22
build.gradle
22
build.gradle
|
@ -1,8 +1,8 @@
|
|||
plugins {
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.7.20'
|
||||
id 'org.jetbrains.kotlin.plugin.spring' version '1.7.20'
|
||||
id 'org.springframework.boot' version '2.7.6'
|
||||
id 'io.spring.dependency-management' version '1.1.0'
|
||||
id 'org.jetbrains.kotlin.jvm' version '1.9.23'
|
||||
id 'org.jetbrains.kotlin.plugin.spring' version '1.9.23'
|
||||
id 'org.springframework.boot' version '3.2.4'
|
||||
id 'io.spring.dependency-management' version '1.1.4'
|
||||
}
|
||||
|
||||
group 'org.mosad'
|
||||
|
@ -13,13 +13,13 @@ repositories {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web:2.7.6'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.7.22'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.4'
|
||||
implementation 'org.jsoup:jsoup:1.15.3'
|
||||
implementation 'com.google.code.gson:gson:2.10'
|
||||
implementation 'org.springframework.boot:spring-boot-starter-web:3.2.4'
|
||||
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.9.23'
|
||||
implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.8.0'
|
||||
implementation 'org.jsoup:jsoup:1.17.2'
|
||||
implementation 'com.google.code.gson:gson:2.10.1'
|
||||
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.8.2'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter:5.10.2'
|
||||
}
|
||||
|
||||
test {
|
||||
|
@ -30,7 +30,7 @@ test {
|
|||
}
|
||||
}
|
||||
|
||||
def jvmTargetVersion = "11"
|
||||
def jvmTargetVersion = "21"
|
||||
compileKotlin {
|
||||
kotlinOptions.jvmTarget = jvmTargetVersion
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
networkTimeout=10000
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
|
|
|
@ -29,7 +29,7 @@ import java.io.BufferedReader
|
|||
import java.io.IOException
|
||||
import java.io.InputStreamReader
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URL
|
||||
import java.net.URI
|
||||
|
||||
class CachetAPIController {
|
||||
|
||||
|
@ -41,7 +41,7 @@ class CachetAPIController {
|
|||
|
||||
fun postTotalRequests() {
|
||||
try {
|
||||
val url = URL("${StartupController.cachetBaseURL}/api/v1/metrics/1/points")
|
||||
val url = URI("${StartupController.cachetBaseURL}/api/v1/metrics/1/points").toURL()
|
||||
val jsonInputString = "{\"value\": ${totalRequests -oldTotalRequests}, \"timestamp\": \"${(System.currentTimeMillis() / 1000)}\"}"
|
||||
oldTotalRequests = totalRequests
|
||||
|
||||
|
|
|
@ -29,6 +29,7 @@ import org.mosad.thecitadelofricks.Status
|
|||
import org.slf4j.Logger
|
||||
import org.slf4j.LoggerFactory
|
||||
import java.net.HttpURLConnection
|
||||
import java.net.URI
|
||||
import java.net.URL
|
||||
import java.time.LocalDateTime
|
||||
import java.util.*
|
||||
|
@ -90,8 +91,8 @@ class StatusController {
|
|||
var swfrCode = 999
|
||||
|
||||
try {
|
||||
val hsoURL = URL("https://www.hs-offenburg.de/")
|
||||
val swfrURL = URL("https://www.swfr.de/")
|
||||
val hsoURL = URI("https://www.hs-offenburg.de/").toURL()
|
||||
val swfrURL = URI("https://www.swfr.de/").toURL()
|
||||
|
||||
var connection = hsoURL.openConnection() as HttpURLConnection
|
||||
connection.requestMethod = "HEAD"
|
||||
|
|
Loading…
Reference in New Issue