diff --git a/gradle.properties b/gradle.properties index b360187..3ad5cc5 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,4 +1,4 @@ -projectname=template +projectname=wahlrecht projectgroup=de.2martens projectSourceCompatibility=17 file.encoding=utf-8 diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbeCriticality.java b/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbeCriticality.java deleted file mode 100644 index f7f4f55..0000000 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbeCriticality.java +++ /dev/null @@ -1,7 +0,0 @@ -package de.twomartens.template.monitoring.statusprobe; - - -public enum StatusProbeCriticality { - K1, K2, K3 -} - diff --git a/module-server/src/main/java/de/twomartens/template/MainApplication.java b/module-server/src/main/java/de/twomartens/wahlrecht/MainApplication.java similarity index 97% rename from module-server/src/main/java/de/twomartens/template/MainApplication.java rename to module-server/src/main/java/de/twomartens/wahlrecht/MainApplication.java index 344c0b3..18fe95e 100644 --- a/module-server/src/main/java/de/twomartens/template/MainApplication.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/MainApplication.java @@ -1,4 +1,4 @@ -package de.twomartens.template; +package de.twomartens.wahlrecht; import io.swagger.v3.oas.models.OpenAPI; import io.swagger.v3.oas.models.info.Info; diff --git a/module-server/src/main/java/de/twomartens/template/configuration/ClockConfiguration.java b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/ClockConfiguration.java similarity index 79% rename from module-server/src/main/java/de/twomartens/template/configuration/ClockConfiguration.java rename to module-server/src/main/java/de/twomartens/wahlrecht/configuration/ClockConfiguration.java index dbfcccc..06037b1 100644 --- a/module-server/src/main/java/de/twomartens/template/configuration/ClockConfiguration.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/ClockConfiguration.java @@ -1,6 +1,6 @@ -package de.twomartens.template.configuration; +package de.twomartens.wahlrecht.configuration; -import de.twomartens.template.property.ServiceProperties; +import de.twomartens.wahlrecht.property.ServiceProperties; import java.time.Clock; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; diff --git a/module-server/src/main/java/de/twomartens/template/configuration/InterceptorConfiguration.java b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/InterceptorConfiguration.java similarity index 71% rename from module-server/src/main/java/de/twomartens/template/configuration/InterceptorConfiguration.java rename to module-server/src/main/java/de/twomartens/wahlrecht/configuration/InterceptorConfiguration.java index b574c8f..78fe9d7 100644 --- a/module-server/src/main/java/de/twomartens/template/configuration/InterceptorConfiguration.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/InterceptorConfiguration.java @@ -1,7 +1,7 @@ -package de.twomartens.template.configuration; +package de.twomartens.wahlrecht.configuration; -import de.twomartens.template.interceptor.HeaderInterceptorRest; -import de.twomartens.template.interceptor.LoggingInterceptorRest; +import de.twomartens.wahlrecht.interceptor.HeaderInterceptorRest; +import de.twomartens.wahlrecht.interceptor.LoggingInterceptorRest; import java.time.Clock; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/module-server/src/main/java/de/twomartens/template/configuration/OpenApiConfiguration.java b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/OpenApiConfiguration.java similarity index 79% rename from module-server/src/main/java/de/twomartens/template/configuration/OpenApiConfiguration.java rename to module-server/src/main/java/de/twomartens/wahlrecht/configuration/OpenApiConfiguration.java index 5b43c18..8fad819 100644 --- a/module-server/src/main/java/de/twomartens/template/configuration/OpenApiConfiguration.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/OpenApiConfiguration.java @@ -1,4 +1,4 @@ -package de.twomartens.template.configuration; +package de.twomartens.wahlrecht.configuration; import org.springdoc.core.models.GroupedOpenApi; import org.springframework.context.annotation.Bean; @@ -11,7 +11,7 @@ public class OpenApiConfiguration { public GroupedOpenApi swaggerApi10() { return GroupedOpenApi.builder() .group("1.0") - .pathsToMatch("/template/v1/**") + .pathsToMatch("/wahlrecht/v1/**") .build(); } diff --git a/module-server/src/main/java/de/twomartens/template/configuration/RestTemplateConfiguration.java b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/RestTemplateConfiguration.java similarity index 84% rename from module-server/src/main/java/de/twomartens/template/configuration/RestTemplateConfiguration.java rename to module-server/src/main/java/de/twomartens/wahlrecht/configuration/RestTemplateConfiguration.java index e03c787..1e6ac81 100644 --- a/module-server/src/main/java/de/twomartens/template/configuration/RestTemplateConfiguration.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/RestTemplateConfiguration.java @@ -1,8 +1,8 @@ -package de.twomartens.template.configuration; +package de.twomartens.wahlrecht.configuration; -import de.twomartens.template.interceptor.HeaderInterceptorRest; -import de.twomartens.template.interceptor.LoggingInterceptorRest; -import de.twomartens.template.property.RestTemplateTimeoutProperties; +import de.twomartens.wahlrecht.interceptor.HeaderInterceptorRest; +import de.twomartens.wahlrecht.interceptor.LoggingInterceptorRest; +import de.twomartens.wahlrecht.property.RestTemplateTimeoutProperties; import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; diff --git a/module-server/src/main/java/de/twomartens/template/configuration/StatusProbeConfiguration.java b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/StatusProbeConfiguration.java similarity index 63% rename from module-server/src/main/java/de/twomartens/template/configuration/StatusProbeConfiguration.java rename to module-server/src/main/java/de/twomartens/wahlrecht/configuration/StatusProbeConfiguration.java index de15d24..ab95be0 100644 --- a/module-server/src/main/java/de/twomartens/template/configuration/StatusProbeConfiguration.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/StatusProbeConfiguration.java @@ -1,9 +1,9 @@ -package de.twomartens.template.configuration; +package de.twomartens.wahlrecht.configuration; -import de.twomartens.template.monitoring.statusprobe.CountBasedStatusProbe; -import de.twomartens.template.monitoring.statusprobe.StatusProbe; -import de.twomartens.template.monitoring.statusprobe.StatusProbeCriticality; -import de.twomartens.template.monitoring.statusprobe.StatusProbeLogger; +import de.twomartens.wahlrecht.monitoring.statusprobe.CountBasedStatusProbe; +import de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbe; +import de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbeCriticality; +import de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbeLogger; import java.time.Clock; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Bean; diff --git a/module-server/src/main/java/de/twomartens/template/configuration/WebConfiguration.java b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/WebConfiguration.java similarity index 88% rename from module-server/src/main/java/de/twomartens/template/configuration/WebConfiguration.java rename to module-server/src/main/java/de/twomartens/wahlrecht/configuration/WebConfiguration.java index 3b6378c..653b4a7 100644 --- a/module-server/src/main/java/de/twomartens/template/configuration/WebConfiguration.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/configuration/WebConfiguration.java @@ -1,6 +1,6 @@ -package de.twomartens.template.configuration; +package de.twomartens.wahlrecht.configuration; -import de.twomartens.template.interceptor.HeaderInterceptorRest; +import de.twomartens.wahlrecht.interceptor.HeaderInterceptorRest; import lombok.RequiredArgsConstructor; import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistration; diff --git a/module-server/src/main/java/de/twomartens/template/controller/ExceptionController.java b/module-server/src/main/java/de/twomartens/wahlrecht/controller/ExceptionController.java similarity index 88% rename from module-server/src/main/java/de/twomartens/template/controller/ExceptionController.java rename to module-server/src/main/java/de/twomartens/wahlrecht/controller/ExceptionController.java index c09d4ab..0a16973 100644 --- a/module-server/src/main/java/de/twomartens/template/controller/ExceptionController.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/controller/ExceptionController.java @@ -1,7 +1,7 @@ -package de.twomartens.template.controller; +package de.twomartens.wahlrecht.controller; -import de.twomartens.template.exception.HttpStatusException; -import de.twomartens.template.model.dto.ErrorMessage; +import de.twomartens.wahlrecht.exception.HttpStatusException; +import de.twomartens.wahlrecht.model.dto.ErrorMessage; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/module-server/src/main/java/de/twomartens/template/controller/VersionHtmlController.java b/module-server/src/main/java/de/twomartens/wahlrecht/controller/VersionHtmlController.java similarity index 97% rename from module-server/src/main/java/de/twomartens/template/controller/VersionHtmlController.java rename to module-server/src/main/java/de/twomartens/wahlrecht/controller/VersionHtmlController.java index 2f23900..7296294 100644 --- a/module-server/src/main/java/de/twomartens/template/controller/VersionHtmlController.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/controller/VersionHtmlController.java @@ -1,4 +1,4 @@ -package de.twomartens.template.controller; +package de.twomartens.wahlrecht.controller; import java.io.FileNotFoundException; import java.io.InputStream; @@ -27,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestMapping; @Slf4j @Controller @RequiredArgsConstructor -@RequestMapping(value = "/vorlage") +@RequestMapping(value = "/wahlrecht") public class VersionHtmlController { @GetMapping(path = "/html/version.html") diff --git a/module-server/src/main/java/de/twomartens/template/controller/v1/GreetingRestController.java b/module-server/src/main/java/de/twomartens/wahlrecht/controller/v1/GreetingRestController.java similarity index 87% rename from module-server/src/main/java/de/twomartens/template/controller/v1/GreetingRestController.java rename to module-server/src/main/java/de/twomartens/wahlrecht/controller/v1/GreetingRestController.java index 0ac0e81..1509c39 100644 --- a/module-server/src/main/java/de/twomartens/template/controller/v1/GreetingRestController.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/controller/v1/GreetingRestController.java @@ -1,8 +1,8 @@ -package de.twomartens.template.controller.v1; +package de.twomartens.wahlrecht.controller.v1; -import de.twomartens.template.mapper.v1.GreetingMapper; -import de.twomartens.template.model.dto.v1.Greeting; -import de.twomartens.template.service.GreetingService; +import de.twomartens.wahlrecht.mapper.v1.GreetingMapper; +import de.twomartens.wahlrecht.model.dto.v1.Greeting; +import de.twomartens.wahlrecht.service.GreetingService; import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.responses.ApiResponse; @@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.RestController; @Slf4j @RestController @RequiredArgsConstructor -@RequestMapping(value = "/template/v1") +@RequestMapping(value = "/wahlrecht/v1") @Tag(name = "Greeting Example", description = "all requests relating to greetings") public class GreetingRestController { diff --git a/module-server/src/main/java/de/twomartens/template/exception/HttpStatusException.java b/module-server/src/main/java/de/twomartens/wahlrecht/exception/HttpStatusException.java similarity index 90% rename from module-server/src/main/java/de/twomartens/template/exception/HttpStatusException.java rename to module-server/src/main/java/de/twomartens/wahlrecht/exception/HttpStatusException.java index 8eac239..793cff8 100644 --- a/module-server/src/main/java/de/twomartens/template/exception/HttpStatusException.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/exception/HttpStatusException.java @@ -1,4 +1,4 @@ -package de.twomartens.template.exception; +package de.twomartens.wahlrecht.exception; import lombok.Getter; import org.springframework.http.HttpStatus; diff --git a/module-server/src/main/java/de/twomartens/template/interceptor/BufferingClientHttpResponseWrapper.java b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/BufferingClientHttpResponseWrapper.java similarity index 97% rename from module-server/src/main/java/de/twomartens/template/interceptor/BufferingClientHttpResponseWrapper.java rename to module-server/src/main/java/de/twomartens/wahlrecht/interceptor/BufferingClientHttpResponseWrapper.java index 4404be0..c559f21 100644 --- a/module-server/src/main/java/de/twomartens/template/interceptor/BufferingClientHttpResponseWrapper.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/BufferingClientHttpResponseWrapper.java @@ -14,7 +14,7 @@ * limitations under the License. */ -package de.twomartens.template.interceptor; +package de.twomartens.wahlrecht.interceptor; import java.io.ByteArrayInputStream; import java.io.IOException; diff --git a/module-server/src/main/java/de/twomartens/template/interceptor/HeaderInterceptor.java b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/HeaderInterceptor.java similarity index 98% rename from module-server/src/main/java/de/twomartens/template/interceptor/HeaderInterceptor.java rename to module-server/src/main/java/de/twomartens/wahlrecht/interceptor/HeaderInterceptor.java index a750e30..5ccf79a 100644 --- a/module-server/src/main/java/de/twomartens/template/interceptor/HeaderInterceptor.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/HeaderInterceptor.java @@ -1,4 +1,4 @@ -package de.twomartens.template.interceptor; +package de.twomartens.wahlrecht.interceptor; import java.io.Closeable; import java.util.Optional; diff --git a/module-server/src/main/java/de/twomartens/template/interceptor/HeaderInterceptorRest.java b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/HeaderInterceptorRest.java similarity index 98% rename from module-server/src/main/java/de/twomartens/template/interceptor/HeaderInterceptorRest.java rename to module-server/src/main/java/de/twomartens/wahlrecht/interceptor/HeaderInterceptorRest.java index 97ddd4f..3fc795a 100644 --- a/module-server/src/main/java/de/twomartens/template/interceptor/HeaderInterceptorRest.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/HeaderInterceptorRest.java @@ -1,4 +1,4 @@ -package de.twomartens.template.interceptor; +package de.twomartens.wahlrecht.interceptor; import jakarta.servlet.http.HttpServletRequest; import jakarta.servlet.http.HttpServletResponse; diff --git a/module-server/src/main/java/de/twomartens/template/interceptor/LoggingInterceptorRest.java b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/LoggingInterceptorRest.java similarity index 99% rename from module-server/src/main/java/de/twomartens/template/interceptor/LoggingInterceptorRest.java rename to module-server/src/main/java/de/twomartens/wahlrecht/interceptor/LoggingInterceptorRest.java index be23359..87edda3 100644 --- a/module-server/src/main/java/de/twomartens/template/interceptor/LoggingInterceptorRest.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/interceptor/LoggingInterceptorRest.java @@ -1,4 +1,4 @@ -package de.twomartens.template.interceptor; +package de.twomartens.wahlrecht.interceptor; import jakarta.servlet.Filter; import jakarta.servlet.FilterChain; diff --git a/module-server/src/main/java/de/twomartens/template/mapper/v1/GreetingMapper.java b/module-server/src/main/java/de/twomartens/wahlrecht/mapper/v1/GreetingMapper.java similarity index 70% rename from module-server/src/main/java/de/twomartens/template/mapper/v1/GreetingMapper.java rename to module-server/src/main/java/de/twomartens/wahlrecht/mapper/v1/GreetingMapper.java index 7bc4d90..8322fe1 100644 --- a/module-server/src/main/java/de/twomartens/template/mapper/v1/GreetingMapper.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/mapper/v1/GreetingMapper.java @@ -1,6 +1,6 @@ -package de.twomartens.template.mapper.v1; +package de.twomartens.wahlrecht.mapper.v1; -import de.twomartens.template.model.db.Greeting; +import de.twomartens.wahlrecht.model.db.Greeting; import org.mapstruct.CollectionMappingStrategy; import org.mapstruct.Mapper; import org.mapstruct.Mapping; @@ -12,10 +12,10 @@ import org.mapstruct.ReportingPolicy; unmappedTargetPolicy = ReportingPolicy.IGNORE) public interface GreetingMapper { - de.twomartens.template.model.dto.v1.Greeting map(Greeting greeting); + de.twomartens.wahlrecht.model.dto.v1.Greeting map(Greeting greeting); @Mapping(target = "id", ignore = true) @Mapping(target = "created", ignore = true) @Mapping(target = "lastModified", ignore = true) - Greeting map(de.twomartens.template.model.dto.v1.Greeting greeting); + Greeting map(de.twomartens.wahlrecht.model.dto.v1.Greeting greeting); } diff --git a/module-server/src/main/java/de/twomartens/template/model/db/Greeting.java b/module-server/src/main/java/de/twomartens/wahlrecht/model/db/Greeting.java similarity index 95% rename from module-server/src/main/java/de/twomartens/template/model/db/Greeting.java rename to module-server/src/main/java/de/twomartens/wahlrecht/model/db/Greeting.java index ed137f0..1bf301b 100644 --- a/module-server/src/main/java/de/twomartens/template/model/db/Greeting.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/model/db/Greeting.java @@ -1,4 +1,4 @@ -package de.twomartens.template.model.db; +package de.twomartens.wahlrecht.model.db; import java.util.Date; import lombok.AccessLevel; diff --git a/module-server/src/main/java/de/twomartens/template/model/dto/ErrorMessage.java b/module-server/src/main/java/de/twomartens/wahlrecht/model/dto/ErrorMessage.java similarity index 92% rename from module-server/src/main/java/de/twomartens/template/model/dto/ErrorMessage.java rename to module-server/src/main/java/de/twomartens/wahlrecht/model/dto/ErrorMessage.java index cb5a893..ae19d21 100644 --- a/module-server/src/main/java/de/twomartens/template/model/dto/ErrorMessage.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/model/dto/ErrorMessage.java @@ -1,4 +1,4 @@ -package de.twomartens.template.model.dto; +package de.twomartens.wahlrecht.model.dto; import lombok.AccessLevel; import lombok.AllArgsConstructor; diff --git a/module-server/src/main/java/de/twomartens/template/model/dto/v1/Greeting.java b/module-server/src/main/java/de/twomartens/wahlrecht/model/dto/v1/Greeting.java similarity index 94% rename from module-server/src/main/java/de/twomartens/template/model/dto/v1/Greeting.java rename to module-server/src/main/java/de/twomartens/wahlrecht/model/dto/v1/Greeting.java index 9a8fdde..eb98634 100644 --- a/module-server/src/main/java/de/twomartens/template/model/dto/v1/Greeting.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/model/dto/v1/Greeting.java @@ -1,4 +1,4 @@ -package de.twomartens.template.model.dto.v1; +package de.twomartens.wahlrecht.model.dto.v1; import io.swagger.v3.oas.annotations.media.Schema; import lombok.AccessLevel; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/AbstractHealthIndicator.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/AbstractHealthIndicator.java similarity index 98% rename from module-server/src/main/java/de/twomartens/template/monitoring/actuator/AbstractHealthIndicator.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/AbstractHealthIndicator.java index 5b0cfd3..2e6fbc2 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/AbstractHealthIndicator.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/AbstractHealthIndicator.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.actuator; +package de.twomartens.wahlrecht.monitoring.actuator; import java.io.Closeable; import java.io.IOException; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/AbstractStatusProbeHealthIndicator.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/AbstractStatusProbeHealthIndicator.java similarity index 91% rename from module-server/src/main/java/de/twomartens/template/monitoring/actuator/AbstractStatusProbeHealthIndicator.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/AbstractStatusProbeHealthIndicator.java index 9ee1ab8..0cd131e 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/AbstractStatusProbeHealthIndicator.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/AbstractStatusProbeHealthIndicator.java @@ -1,6 +1,6 @@ -package de.twomartens.template.monitoring.actuator; +package de.twomartens.wahlrecht.monitoring.actuator; -import de.twomartens.template.monitoring.statusprobe.StatusProbe; +import de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbe; import java.time.Clock; import java.util.Optional; import lombok.extern.slf4j.Slf4j; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/Preparable.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/Preparable.java similarity index 66% rename from module-server/src/main/java/de/twomartens/template/monitoring/actuator/Preparable.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/Preparable.java index 0b53049..993b3b8 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/Preparable.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/Preparable.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.actuator; +package de.twomartens.wahlrecht.monitoring.actuator; import java.io.Closeable; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/RestHealthIndicator.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/RestHealthIndicator.java similarity index 92% rename from module-server/src/main/java/de/twomartens/template/monitoring/actuator/RestHealthIndicator.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/RestHealthIndicator.java index 62c1a5e..ceb0d10 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/actuator/RestHealthIndicator.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/actuator/RestHealthIndicator.java @@ -1,6 +1,6 @@ -package de.twomartens.template.monitoring.actuator; +package de.twomartens.wahlrecht.monitoring.actuator; -import de.twomartens.template.interceptor.HeaderInterceptorRest; +import de.twomartens.wahlrecht.interceptor.HeaderInterceptorRest; import java.security.SecureRandom; import java.time.Clock; import java.util.Optional; @@ -30,7 +30,7 @@ import org.springframework.web.client.RestTemplate; @Component public class RestHealthIndicator extends AbstractHealthIndicator implements HealthIndicator { - private static final String URL_PATH = "/template/v1/healthCheck"; + private static final String URL_PATH = "/wahlrecht/v1/healthCheck"; private static final String GET_PARAMETER = "message="; private final SecureRandom randomizer = new SecureRandom(); diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/CountBasedStatusProbe.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/CountBasedStatusProbe.java similarity index 94% rename from module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/CountBasedStatusProbe.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/CountBasedStatusProbe.java index 799337e..3ebf5d4 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/CountBasedStatusProbe.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/CountBasedStatusProbe.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.statusprobe; +package de.twomartens.wahlrecht.monitoring.statusprobe; import java.time.Clock; import java.util.concurrent.atomic.AtomicInteger; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/PercentageBasedStatusProbe.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/PercentageBasedStatusProbe.java similarity index 97% rename from module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/PercentageBasedStatusProbe.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/PercentageBasedStatusProbe.java index a0ae97c..fac49f6 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/PercentageBasedStatusProbe.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/PercentageBasedStatusProbe.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.statusprobe; +package de.twomartens.wahlrecht.monitoring.statusprobe; import java.time.Clock; import java.time.Duration; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/ScheduledStatusProbe.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/ScheduledStatusProbe.java similarity index 90% rename from module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/ScheduledStatusProbe.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/ScheduledStatusProbe.java index 8a19fd1..da13115 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/ScheduledStatusProbe.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/ScheduledStatusProbe.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.statusprobe; +package de.twomartens.wahlrecht.monitoring.statusprobe; import java.time.Duration; import org.springframework.scheduling.concurrent.ThreadPoolTaskScheduler; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbe.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbe.java similarity index 96% rename from module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbe.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbe.java index 36a0bf9..1b00e4e 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbe.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbe.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.statusprobe; +package de.twomartens.wahlrecht.monitoring.statusprobe; import java.time.Clock; import java.time.ZonedDateTime; diff --git a/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbeCriticality.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbeCriticality.java new file mode 100644 index 0000000..885cddd --- /dev/null +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbeCriticality.java @@ -0,0 +1,7 @@ +package de.twomartens.wahlrecht.monitoring.statusprobe; + + +public enum StatusProbeCriticality { + K1, K2, K3 +} + diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbeLogger.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbeLogger.java similarity index 93% rename from module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbeLogger.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbeLogger.java index 9ddfa43..8ac5045 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/StatusProbeLogger.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/StatusProbeLogger.java @@ -1,8 +1,8 @@ -package de.twomartens.template.monitoring.statusprobe; +package de.twomartens.wahlrecht.monitoring.statusprobe; -import static de.twomartens.template.monitoring.statusprobe.StatusProbeCriticality.K1; -import static de.twomartens.template.monitoring.statusprobe.StatusProbeCriticality.K2; -import static de.twomartens.template.monitoring.statusprobe.StatusProbeCriticality.K3; +import static de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbeCriticality.K1; +import static de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbeCriticality.K2; +import static de.twomartens.wahlrecht.monitoring.statusprobe.StatusProbeCriticality.K3; import java.time.Clock; import java.time.ZonedDateTime; diff --git a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/TimeBasedStatusProbe.java b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/TimeBasedStatusProbe.java similarity index 97% rename from module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/TimeBasedStatusProbe.java rename to module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/TimeBasedStatusProbe.java index 250dcba..1fcb76f 100644 --- a/module-server/src/main/java/de/twomartens/template/monitoring/statusprobe/TimeBasedStatusProbe.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/monitoring/statusprobe/TimeBasedStatusProbe.java @@ -1,4 +1,4 @@ -package de.twomartens.template.monitoring.statusprobe; +package de.twomartens.wahlrecht.monitoring.statusprobe; import java.time.Clock; import java.time.Duration; diff --git a/module-server/src/main/java/de/twomartens/template/property/RestTemplateTimeoutProperties.java b/module-server/src/main/java/de/twomartens/wahlrecht/property/RestTemplateTimeoutProperties.java similarity index 90% rename from module-server/src/main/java/de/twomartens/template/property/RestTemplateTimeoutProperties.java rename to module-server/src/main/java/de/twomartens/wahlrecht/property/RestTemplateTimeoutProperties.java index d2673a7..264a722 100644 --- a/module-server/src/main/java/de/twomartens/template/property/RestTemplateTimeoutProperties.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/property/RestTemplateTimeoutProperties.java @@ -1,4 +1,4 @@ -package de.twomartens.template.property; +package de.twomartens.wahlrecht.property; import java.time.Duration; import java.time.temporal.ChronoUnit; @@ -18,7 +18,7 @@ import org.springframework.stereotype.Component; @EqualsAndHashCode @AllArgsConstructor @NoArgsConstructor -@ConfigurationProperties(prefix = "resttemplate.timeout") +@ConfigurationProperties(prefix = "restwahlrecht.timeout") @Component public class RestTemplateTimeoutProperties { diff --git a/module-server/src/main/java/de/twomartens/template/property/ServiceProperties.java b/module-server/src/main/java/de/twomartens/wahlrecht/property/ServiceProperties.java similarity index 82% rename from module-server/src/main/java/de/twomartens/template/property/ServiceProperties.java rename to module-server/src/main/java/de/twomartens/wahlrecht/property/ServiceProperties.java index 4b3f4fb..423cc02 100644 --- a/module-server/src/main/java/de/twomartens/template/property/ServiceProperties.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/property/ServiceProperties.java @@ -1,4 +1,4 @@ -package de.twomartens.template.property; +package de.twomartens.wahlrecht.property; import io.swagger.v3.oas.annotations.media.Schema; import java.time.ZoneId; @@ -10,7 +10,7 @@ import org.springframework.context.annotation.Configuration; @Data @RefreshScope @Configuration -@ConfigurationProperties(prefix = "de.twomartens.template") +@ConfigurationProperties(prefix = "de.twomartens.wahlrecht") @Schema(description = "Properties, to configure this Application") public class ServiceProperties { diff --git a/module-server/src/main/java/de/twomartens/template/property/StatusProbeProperties.java b/module-server/src/main/java/de/twomartens/wahlrecht/property/StatusProbeProperties.java similarity index 86% rename from module-server/src/main/java/de/twomartens/template/property/StatusProbeProperties.java rename to module-server/src/main/java/de/twomartens/wahlrecht/property/StatusProbeProperties.java index b1a0095..d9519b1 100644 --- a/module-server/src/main/java/de/twomartens/template/property/StatusProbeProperties.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/property/StatusProbeProperties.java @@ -1,4 +1,4 @@ -package de.twomartens.template.property; +package de.twomartens.wahlrecht.property; import io.swagger.v3.oas.annotations.media.Schema; import java.time.Duration; @@ -12,7 +12,7 @@ import org.springframework.context.annotation.Configuration; @Data @RefreshScope @Configuration -@ConfigurationProperties(prefix = "de.twomartens.template.statusprobe") +@ConfigurationProperties(prefix = "de.twomartens.wahlrecht.statusprobe") @Schema(description = "Properties, to configure this Application") public class StatusProbeProperties { diff --git a/module-server/src/main/java/de/twomartens/template/repository/GreetingRepository.java b/module-server/src/main/java/de/twomartens/wahlrecht/repository/GreetingRepository.java similarity index 72% rename from module-server/src/main/java/de/twomartens/template/repository/GreetingRepository.java rename to module-server/src/main/java/de/twomartens/wahlrecht/repository/GreetingRepository.java index aad78c3..0b13531 100644 --- a/module-server/src/main/java/de/twomartens/template/repository/GreetingRepository.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/repository/GreetingRepository.java @@ -1,6 +1,6 @@ -package de.twomartens.template.repository; +package de.twomartens.wahlrecht.repository; -import de.twomartens.template.model.db.Greeting; +import de.twomartens.wahlrecht.model.db.Greeting; import java.util.Optional; import org.springframework.data.mongodb.repository.MongoRepository; diff --git a/module-server/src/main/java/de/twomartens/template/service/GreetingService.java b/module-server/src/main/java/de/twomartens/wahlrecht/service/GreetingService.java similarity index 75% rename from module-server/src/main/java/de/twomartens/template/service/GreetingService.java rename to module-server/src/main/java/de/twomartens/wahlrecht/service/GreetingService.java index 994384b..f1cf87d 100644 --- a/module-server/src/main/java/de/twomartens/template/service/GreetingService.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/service/GreetingService.java @@ -1,8 +1,8 @@ -package de.twomartens.template.service; +package de.twomartens.wahlrecht.service; -import de.twomartens.template.model.db.Greeting; -import de.twomartens.template.property.ServiceProperties; -import de.twomartens.template.repository.GreetingRepository; +import de.twomartens.wahlrecht.model.db.Greeting; +import de.twomartens.wahlrecht.property.ServiceProperties; +import de.twomartens.wahlrecht.repository.GreetingRepository; import io.micrometer.core.instrument.Counter; import io.micrometer.core.instrument.MeterRegistry; import lombok.extern.slf4j.Slf4j; @@ -23,13 +23,13 @@ public class GreetingService { this.meterRegistry = meterRegistry; this.serviceProperties = serviceProperties; this.greetingRepository = greetingRepository; - counter = meterRegistry.counter("template.callCounter"); + counter = meterRegistry.counter("wahlrecht.callCounter"); } public Greeting createGreeting(String name) { log.info("Create greeting for '{}'", name); counter.increment(); - meterRegistry.gauge("template.nameLength", name.length()); + meterRegistry.gauge("wahlrecht.nameLength", name.length()); String greeting = serviceProperties.getGreeting(); return Greeting.builder().message(String.format(greeting, name)).build(); } diff --git a/module-server/src/main/java/de/twomartens/template/service/PropertyReloadService.java b/module-server/src/main/java/de/twomartens/wahlrecht/service/PropertyReloadService.java similarity index 96% rename from module-server/src/main/java/de/twomartens/template/service/PropertyReloadService.java rename to module-server/src/main/java/de/twomartens/wahlrecht/service/PropertyReloadService.java index 5864846..94fcd1b 100644 --- a/module-server/src/main/java/de/twomartens/template/service/PropertyReloadService.java +++ b/module-server/src/main/java/de/twomartens/wahlrecht/service/PropertyReloadService.java @@ -1,4 +1,4 @@ -package de.twomartens.template.service; +package de.twomartens.wahlrecht.service; import java.util.Set; import java.util.concurrent.TimeUnit;