commit ae572c277d36c7e247ce0e59f1668b018d5be9cf
parent 9029a39aac0f2e36f11ebeec4349f07ba5145b48
Author: Wim Dupont <wim@wimdupont.com>
Date: Fri, 25 Aug 2023 12:58:44 +0200
upgrade
Former-commit-id: c31f3778036071d41f8a73494cafad4604f1b347
Diffstat:
3 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/pom.xml b/pom.xml
@@ -5,7 +5,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
- <version>3.1.2</version>
+ <version>3.1.3</version>
</parent>
<groupId>com.wimdupont</groupId>
<artifactId>personalweb</artifactId>
@@ -15,7 +15,7 @@
<properties>
<java.version>17</java.version>
- <springdoc-openapi.version>2.1.0</springdoc-openapi.version>
+ <springdoc-openapi.version>2.2.0</springdoc-openapi.version>
<asciidoctorj.version>2.5.10</asciidoctorj.version>
<flyway.configFiles>src/main/resources/application.properties</flyway.configFiles>
</properties>
diff --git a/src/main/java/com/wimdupont/personalweb/model/InszModel.java b/src/main/java/com/wimdupont/personalweb/model/InszModel.java
@@ -44,7 +44,6 @@ public record InszModel(
int maxDay = (int) LocalDate.of(2999, 1, 1).toEpochDay();
birthDate = LocalDate.ofEpochDay(generateRandom(minDay, maxDay));
}
- System.out.println("random date: " + birthDate);
return birthDate;
}
diff --git a/src/main/java/com/wimdupont/personalweb/service/InszService.java b/src/main/java/com/wimdupont/personalweb/service/InszService.java
@@ -5,8 +5,6 @@ import com.wimdupont.personalweb.model.Gender;
import com.wimdupont.personalweb.model.InszModel;
import jakarta.validation.Valid;
import org.apache.commons.lang3.StringUtils;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@@ -14,8 +12,6 @@ import org.springframework.validation.annotation.Validated;
@Validated
public class InszService {
- private static final Logger LOGGER = LoggerFactory.getLogger(InszService.class);
-
public String generate(@Valid InszModel insz) {
var year = StringUtils.leftPad(String.valueOf(insz.birthDate().getYear()), 4, "0").substring(2);
var month = StringUtils.leftPad(String.valueOf(insz.birthDate().getMonthValue()), 2, "0");
@@ -47,9 +43,7 @@ public class InszService {
if (bornAtOrAfter2000) {
baseNumber = 2 + baseNumber;
}
- LOGGER.info("getChecksum for: baseNumber: {}", baseNumber);
var checkSum = 97 - Long.parseLong(baseNumber) % 97;
- LOGGER.info("Checksum = {}", checkSum);
return StringUtils.leftPad(String.valueOf(checkSum), 2, "0");
}