From df3a9017d84a3e01bb93e9d5d5906001a0fe6f97 Mon Sep 17 00:00:00 2001 From: Dima Denysenko Date: Tue, 14 Nov 2023 12:23:24 +0200 Subject: [PATCH] feat: use knowhowto props group --- .../ujar/acmecloudnetflix/starter/cache/CacheProperties.java | 2 +- .../META-INF/additional-spring-configuration-metadata.json | 2 +- src/main/docker/prometheus/prometheus.yml | 2 +- .../config/properties/RestfulApiResourcesProperties.java | 2 +- .../userprofile/config/properties/RestfulClientProperties.java | 2 +- user-profile-service/src/main/resources/application.yml | 2 +- user-profile-service/src/test/resources/application.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/boot-starter-cache/src/main/java/org/ujar/acmecloudnetflix/starter/cache/CacheProperties.java b/boot-starter-cache/src/main/java/org/ujar/acmecloudnetflix/starter/cache/CacheProperties.java index 53982dd..974f481 100644 --- a/boot-starter-cache/src/main/java/org/ujar/acmecloudnetflix/starter/cache/CacheProperties.java +++ b/boot-starter-cache/src/main/java/org/ujar/acmecloudnetflix/starter/cache/CacheProperties.java @@ -2,7 +2,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties; -@ConfigurationProperties(prefix = "ujar.cache", ignoreUnknownFields = false) +@ConfigurationProperties(prefix = "knowhowto.cache", ignoreUnknownFields = false) public class CacheProperties { Ehcache ehcache = new Ehcache(); diff --git a/boot-starter-cache/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/boot-starter-cache/src/main/resources/META-INF/additional-spring-configuration-metadata.json index a5b1424..ecf9300 100644 --- a/boot-starter-cache/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/boot-starter-cache/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -1,7 +1,7 @@ { "properties": [ { - "name": "ujar.cache", + "name": "knowhowto.cache", "description": "Cache configuration definitions.", "type": "org.ujar.acmecloudnetflix.starter.cache.CacheSectionProperties" } diff --git a/src/main/docker/prometheus/prometheus.yml b/src/main/docker/prometheus/prometheus.yml index 462f09f..72a345e 100644 --- a/src/main/docker/prometheus/prometheus.yml +++ b/src/main/docker/prometheus/prometheus.yml @@ -1,4 +1,4 @@ -# Sample global config for monitoring uJar applications +# Sample global config for monitoring KnowHowSpringBoot applications global : scrape_interval : 15s # By default, scrape targets every 15 seconds. evaluation_interval : 15s # By default, scrape targets every 15 seconds. diff --git a/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulApiResourcesProperties.java b/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulApiResourcesProperties.java index aa190d3..d854d08 100644 --- a/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulApiResourcesProperties.java +++ b/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulApiResourcesProperties.java @@ -5,7 +5,7 @@ import org.springframework.boot.context.properties.ConstructorBinding; @ConstructorBinding -@ConfigurationProperties(prefix = "ujar.restful-api-resources") +@ConfigurationProperties(prefix = "knowhowto.restful-api-resources") public record RestfulApiResourcesProperties(@NonNull String departmentServiceBaseUrl, @NonNull String departmentServiceUri) { diff --git a/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulClientProperties.java b/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulClientProperties.java index 030b2a9..5b4e8a0 100644 --- a/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulClientProperties.java +++ b/user-profile-service/src/main/java/org/ujar/acmecloudnetflix/userprofile/config/properties/RestfulClientProperties.java @@ -9,7 +9,7 @@ @ConstructorBinding @Validated -@ConfigurationProperties(prefix = "ujar.restful-client") +@ConfigurationProperties(prefix = "knowhowto.restful-client") public record RestfulClientProperties( @NonNull Duration connectTimeout, @NonNull Duration readTimeout, diff --git a/user-profile-service/src/main/resources/application.yml b/user-profile-service/src/main/resources/application.yml index f1dcdc9..57aa113 100644 --- a/user-profile-service/src/main/resources/application.yml +++ b/user-profile-service/src/main/resources/application.yml @@ -119,7 +119,7 @@ embedded : mongodb : enabled : false -ujar : +knowhowto : restful-client : connect-timeout : ${RESTFUL_CLIENT_CONNECT_TIMEOUT:1s} read-timeout : ${RESTFUL_CLIENT_READ_TIMEOUT:10s} diff --git a/user-profile-service/src/test/resources/application.yml b/user-profile-service/src/test/resources/application.yml index fe31361..7dc72df 100644 --- a/user-profile-service/src/test/resources/application.yml +++ b/user-profile-service/src/test/resources/application.yml @@ -31,7 +31,7 @@ eureka : register-with-eureka : false fetch-registry : false -ujar : +knowhowto : restful-client : connect-timeout : 100ms read-timeout : 100ms