From c73ac4d03fb0cc9519235bf2be4b54fa3f440d63 Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 2 Oct 2023 09:45:38 +0200 Subject: [PATCH 01/18] =?UTF-8?q?Refaktorert=20en=20del=20code=20smells=20?= =?UTF-8?q?og=20begynt=20p=C3=A5=20migrering=20over=20til=20java=2020=20og?= =?UTF-8?q?=20deretter=2021=20#deploy-test-dolly-backend?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/dolly-backend/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/dolly-backend/settings.gradle | 2 +- .../nav/dolly/bestilling/ConsumerStatus.java | 6 +- .../brregstub/domain/RolleoversiktTo.java | 6 +- .../bestilling/dokarkiv/DokarkivConsumer.java | 7 --- .../dokarkiv/domain/DokarkivRequest.java | 5 +- .../dokarkiv/mapper/PdfVedlegg.java | 6 +- .../dolly/bestilling/medl/MedlConsumer.java | 4 +- ...dldataCommand.java => MedlGetCommand.java} | 2 +- .../command/TagsHenteCommand.java | 4 +- .../java/no/nav/dolly/config/AsyncConfig.java | 4 +- .../java/no/nav/dolly/config/LocalConfig.java | 11 ++-- .../consumer/kodeverk/Kor2024NyeKommuner.java | 2 +- .../resultset/aareg/RsAnsettelsesPeriode.java | 2 +- .../resultset/aareg/RsArbeidsavtale.java | 4 +- .../resultset/aareg/RsOrganisasjon.java | 2 +- .../resultset/aareg/RsPeriodeAareg.java | 2 +- .../resultset/aareg/RsPeriodeAmelding.java | 2 +- .../domain/resultset/aareg/RsPermisjon.java | 2 +- .../resultset/aareg/RsUtenlandsopphold.java | 2 +- .../aareg/util/JsonDateSerializer.java | 20 ------- .../arenaforvalter/ArenaNyBruker.java | 2 +- .../domain/resultset/breg/RsBregdata.java | 17 +++--- .../domain/resultset/dokarkiv/RsDokarkiv.java | 57 +++++++++---------- .../inntektstub/RsInntektsinformasjon.java | 6 +- .../util/JsonZonedDateTimeDeserializer.java | 0 ...BestillingInntektsmeldingStatusMapper.java | 5 +- .../BestillingOrganisasjonStatusMapper.java | 16 +++--- .../strategy/BrukerMappingStrategy.java | 5 +- .../service/InntektsmeldingEnumService.java | 39 ++++++++----- .../no/nav/dolly/service/excel/ExcelUtil.java | 14 ++--- .../nav/dolly/util/CurrentAuthentication.java | 2 +- .../consumer/kodeverk/KodeverkMapperTest.java | 26 ++++----- .../domain/resultset/IdentTypeUtilTest.java | 8 +-- .../BestillingAaregStatusMapperTest.java | 6 +- ...tillingArenaforvalterStatusMapperTest.java | 4 +- .../BestillingKrrStubStatusMapperTest.java | 4 +- .../BestillingSigrunStubStatusMapperTest.java | 4 +- .../mapper/BestillingUdiStatusMapperTest.java | 4 +- .../BestillingUdiStubStatusMapperTest.java | 4 +- .../strategy/ArenaMappingStrategyTest.java | 10 ++-- .../strategy/BrukerMappingStrategyTest.java | 4 +- .../mapper/strategy/TestidentMappingTest.java | 4 +- .../api/BestillingControllerTest.java | 10 ++-- .../provider/api/BrukerControllerTest.java | 22 +++---- .../provider/api/OppslagControllerTest.java | 10 +--- .../service/BestillingMalServiceTest.java | 2 +- .../BestillingProgressServiceTest.java | 18 +++--- .../nav/dolly/service/BrukerServiceTest.java | 32 +++++------ .../nav/dolly/service/IdentServiceTest.java | 8 +-- .../OrganisasjonBestillingMalServiceTest.java | 2 +- .../dolly/service/TestgruppeServiceTest.java | 38 ++++++------- .../libs/reactivecore/health/Health.java | 15 ----- .../health/HealthToMeterAutoConfig.java | 34 ----------- .../health/HealthToMeterBinder.java | 45 --------------- .../reactivecore/router/InternalRouter.java | 2 - 57 files changed, 228 insertions(+), 350 deletions(-) rename apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/{getMedldataCommand.java => MedlGetCommand.java} (94%) delete mode 100644 apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateSerializer.java delete mode 100644 apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/util/JsonZonedDateTimeDeserializer.java delete mode 100644 libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/Health.java delete mode 100644 libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterAutoConfig.java delete mode 100644 libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterBinder.java diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 2388a0bb225..36d7996c222 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -45,7 +45,7 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 repositories { mavenCentral() diff --git a/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties b/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties index bdc9a83b1e6..c30b486a892 100644 --- a/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/dolly-backend/settings.gradle b/apps/dolly-backend/settings.gradle index b06db6aee17..5717c7262a2 100644 --- a/apps/dolly-backend/settings.gradle +++ b/apps/dolly-backend/settings.gradle @@ -1,5 +1,5 @@ plugins { - id "com.gradle.enterprise" version "3.12.3" + id "com.gradle.enterprise" version "3.12.6" } rootProject.name = 'dolly-backend' diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/ConsumerStatus.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/ConsumerStatus.java index cb64a5a9210..c3a77076931 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/ConsumerStatus.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/ConsumerStatus.java @@ -9,8 +9,6 @@ import java.util.Map; import java.util.concurrent.ConcurrentHashMap; -import static java.util.Objects.isNull; - public interface ConsumerStatus { org.slf4j.Logger log = org.slf4j.LoggerFactory.getLogger(ConsumerStatus.class); @@ -35,9 +33,7 @@ default Map checkStatus(WebClient webClient) { .bodyToMono(new ParameterizedTypeReference>>() { }) .timeout(Duration.ofSeconds(5)) - .doOnError(throwable -> { - log.error("Klarte ikke å hente status for {}", serviceUrl(), throwable); - }) + .doOnError(throwable -> log.error("Klarte ikke å hente status for {}", serviceUrl(), throwable)) .onErrorReturn(new ConcurrentHashMap<>()) .block(); response.forEach((key, value) -> statusMap.put(key, TestnavStatusResponse.builder() diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/brregstub/domain/RolleoversiktTo.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/brregstub/domain/RolleoversiktTo.java index 8c16a0fda41..4a9f82b8c31 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/brregstub/domain/RolleoversiktTo.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/brregstub/domain/RolleoversiktTo.java @@ -20,8 +20,6 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class RolleoversiktTo { - public enum Egenskap {Deltager, Komplementar, Kontaktperson, Sameier, Styre} - private AdresseTo adresse; private List enheter; private String fnr; @@ -32,7 +30,7 @@ public enum Egenskap {Deltager, Komplementar, Kontaktperson, Sameier, Styre} private String error; public List getUnderstatuser() { - if (isNull(understatuser)){ + if (isNull(understatuser)) { understatuser = new ArrayList<>(); } return understatuser; @@ -45,6 +43,8 @@ public List getEnheter() { return enheter; } + public enum Egenskap {DELTAGER, KOMPLEMENTAR, KONTAKTPERSON, SAMEIER, STYRE} + @Data @Builder @EqualsAndHashCode diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/DokarkivConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/DokarkivConsumer.java index f1f79654017..9cf3f957e40 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/DokarkivConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/DokarkivConsumer.java @@ -17,10 +17,7 @@ import reactor.core.publisher.Mono; import java.util.List; -import java.util.UUID; -import static java.lang.String.format; -import static no.nav.dolly.domain.CommonKeysAndUtils.CONSUMER; import static no.nav.dolly.util.JacksonExchangeStrategyUtil.getJacksonStrategy; @Slf4j @@ -72,8 +69,4 @@ public String consumerName() { return "testnav-dokarkiv-proxy"; } - private static String getNavCallId() { - return format("%s %s", CONSUMER, UUID.randomUUID()); - } - } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/domain/DokarkivRequest.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/domain/DokarkivRequest.java index 503af7ce42c..5cc0e094945 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/domain/DokarkivRequest.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/domain/DokarkivRequest.java @@ -13,7 +13,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import static java.util.Objects.isNull; @@ -83,7 +82,9 @@ public String toString() { return String.format("Dokument{tittel='%s', brevkode='%s', dokumentvariantListe=%s}", tittel, brevkode, - dokumentvarianter.stream().map(DokumentVariant::toString).collect(Collectors.toList())); + dokumentvarianter.stream() + .map(DokumentVariant::toString) + .toList()); } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/mapper/PdfVedlegg.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/mapper/PdfVedlegg.java index 87c02221efe..a31c8bcea65 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/mapper/PdfVedlegg.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/dokarkiv/mapper/PdfVedlegg.java @@ -1,9 +1,13 @@ package no.nav.dolly.bestilling.dokarkiv.mapper; public final class PdfVedlegg { - public static final String PDF_VEDLEGG; + static { PDF_VEDLEGG = "JVBERi0xLjUNCiXi48/TDQozIDAgb2JqDQo8PA0KL0xpbmVhcml6ZWQgMQ0KL0wgMTgzNTcNCi9IIFsgOTM3IDE1MyBdDQovTyA1DQovRSAxNzc3Ng0KL04gMQ0KL1QgMTgxNzENCj4+DQplbmRvYmoNCiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICANCnhyZWYNCjMgMjANCjAwMDAwMDAwMTcgMDAwMDAgbg0KMDAwMDAwMDg2NyAwMDAwMCBuDQowMDAwMDAxMDkwIDAwMDAwIG4NCjAwMDAwMDEzNTggMDAwMDAgbg0KMDAwMDAwMTUzOCAwMDAwMCBuDQowMDAwMDAxODA5IDAwMDAwIG4NCjAwMDAwMDg5NjEgMDAwMDAgbg0KMDAwMDAwODk4NyAwMDAwMCBuDQowMDAwMDA5MTc3IDAwMDAwIG4NCjAwMDAwMDk0NTggMDAwMDAgbg0KMDAwMDAxMjQ5OSAwMDAwMCBuDQowMDAwMDEyNjU3IDAwMDAwIG4NCjAwMDAwMTI2ODcgMDAwMDAgbg0KMDAwMDAxMjg3NyAwMDAwMCBuDQowMDAwMDEyOTU5IDAwMDAwIG4NCjAwMDAwMTMyNDAgMDAwMDAgbg0KMDAwMDAxNzExNyAwMDAwMCBuDQowMDAwMDE3MjA4IDAwMDAwIG4NCjAwMDAwMTc1MzYgMDAwMDAgbg0KMDAwMDAwMDkzNyAwMDAwMCBuDQp0cmFpbGVyDQo8PA0KL1NpemUgMjMNCi9QcmV2IDE4MTYxDQovSW5mbyAyIDAgUg0KL1Jvb3QgNCAwIFINCi9JRCBbPDczZTZhMjVlZmQwZjAxZTRmNTNjZmIyYWZkM2RmODRlPjw3M2U2YTI1ZWZkMGYwMWU0ZjUzY2ZiMmFmZDNkZjg0ZT5dDQo+Pg0Kc3RhcnR4cmVmDQowDQolJUVPRg0KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIA0KNCAwIG9iag0KPDwNCi9UeXBlIC9DYXRhbG9nDQovUGFnZXMgMSAwIFINCi9MYW5nIChuYi1OTykNCj4+DQplbmRvYmoNCjIyIDAgb2JqDQo8PA0KL1MgMzYNCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlDQovTGVuZ3RoIDY1DQo+Pg0Kc3RyZWFtDQp4nGNgYBBkYGBeyQAEjnoM2AAHElsQihkYpBh42SeoNb7em8DANEH+9XEWBUZGD+aG+j06HIp6bBuAKgAW+AqMCg0KZW5kc3RyZWFtDQplbmRvYmoNCjUgMCBvYmoNCjw8DQovVHlwZSAvUGFnZQ0KL01lZGlhQm94IFsgMCAwIDU5NS4zMiA4NDEuOTIgXQ0KL1Jlc291cmNlcyA8PCAvRm9udCA8PCAvRjEgNiAwIFIgL0YyIDEwIDAgUiAvRjMgMTMgMCBSID4+ID4+DQovQ29udGVudHMgMjEgMCBSDQovR3JvdXAgPDwgL1R5cGUgL0dyb3VwIC9TIC9UcmFuc3BhcmVuY3kgL0NTIC9EZXZpY2VSR0IgPj4NCi9QYXJlbnQgMSAwIFINCi9Sb3RhdGUgMA0KL0Nyb3BCb3ggWyAwIDAgNTk1LjMyIDg0MS45MiBdDQo+Pg0KZW5kb2JqDQo2IDAgb2JqDQo8PA0KL1R5cGUgL0ZvbnQNCi9TdWJ0eXBlIC9UcnVlVHlwZQ0KL0Jhc2VGb250IC9BQUFBQUorQ2FsaWJyaQ0KL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcNCi9Gb250RGVzY3JpcHRvciA3IDAgUg0KL0ZpcnN0Q2hhciAzMg0KL0xhc3RDaGFyIDMyDQovV2lkdGhzIDkgMCBSDQo+Pg0KZW5kb2JqDQo3IDAgb2JqDQo8PA0KL1R5cGUgL0ZvbnREZXNjcmlwdG9yDQovRm9udE5hbWUgL0FBQUFBSitDYWxpYnJpDQovRmxhZ3MgMzINCi9JdGFsaWNBbmdsZSAwDQovQXNjZW50IDc1MA0KL0Rlc2NlbnQgLTI1MA0KL0NhcEhlaWdodCA3NTANCi9BdmdXaWR0aCA1MjENCi9NYXhXaWR0aCAxNzQzDQovRm9udFdlaWdodCA0MDANCi9YSGVpZ2h0IDI1MA0KL1N0ZW1WIDUyDQovRm9udEJCb3ggWyAtNTAzIC0yNTAgMTI0MCA3NTAgXQ0KL0ZvbnRGaWxlMiA4IDAgUg0KPj4NCmVuZG9iag0KOCAwIG9iag0KPDwNCi9MZW5ndGgxIDE1NjA4DQovRmlsdGVyIC9GbGF0ZURlY29kZQ0KL0xlbmd0aCA3MDU0DQo+Pg0Kc3RyZWFtDQp4nNWad3xUxdrHZ86mJ5tsQhICC+yGJRFcqrRQJEsahAgkJIu7oWXTCBAgpNAEjCLFVRR7R6yosZwsKAEL2Dso9oag3uv1Kna9XhT2/c159gnlXvnrfT/3vbv73d9vnilnzpwzcyYLQgohzKJVmETx1NJB59x2eOyliHwMKqoW+hrk0OBBIeRYpIdVLW2272p4fzjSDUKEP1HbMHfhmoOmkUJE9kcjzrn1K2qrD5lRN9mDMmvqanzVv527Qhci5X3UH1GHgPkhU74QqRak+9QtbF4e/gmcSB2GL0v94iqfXKOdi3Qe0jELfcsbkr7I+ADpYqTti3wLa3qMHr4DaRxfrmxY3NQctIr1QnT9RuU3NNY0dJnbu5sQaXFo/mthCnPKzSJcRIXfFD4UNXqRmt4Q6zURJbSEcE3Twkxa2BdiYHCv6HMBWolW/ZlcarcLl7CLrRHiuJDPRW7RMu1CBlWeaWd4vDqaSMa3xLipEYwTYaIvNAIqhaZqBoNGKWjw82CVUcp4RW4R4vg14uRXsZgvmnANWnEum8Q1Yo/4SFSKtXA3ia3iXnG/0MXT4mXxnvhffB1fEb5QxJl2os9dhAgeDR45fi/owNmdiFyDVJcw+4lI0BL89rTYt8evCVqOd0QkiRijrlk7gOhP8ljwqJat0sERKq1tgE8wavwQueX4I8e3nTYGJaJczBAzxSxRIXw4/2pRJ+ZhZBaIerFQLDJSi5A3F9+1SM1BqSqUUv5EqcWiATSKZtEiluLdAN8USqm8JUa6RSzDe7lYIVaKC8QqsTr0vcyIrELOSiO9HKwRF+LKXCQuNhwrRdaKS8Q6XLUNYqO49IypSzudX1wmLsd1vkJc+ad+0ympzXhfJa7G/XCtuE5cL27EfXGLuPW06A1G/GaxRdyOe0blXYfI7YZTuU+IF8Sj4mHxiHjMGMsqjBqNCI9LrTGGDRiDVTjDtSf1mMZvWedorcG5q3Pzh850OeIXn1RjaWgcVcm1KEmt0HVQraw+bSQ24xzInzgjSl1nnP+J6MmjcqYoj8etJ43MLUZKudOjf+avF7dhBt6BbzWqyt0JT+52w58c39JZdquRvkvcLe7BtdhmOFaK3Au/TdyHuf2AaBMP4n3Cn+xIHxYPGVdOF+0iILaLHbiSj4mdosOInynv38W3h+KBzsgusVs8jjvkKbEXK80zeHPkScT2hKLPGTFKPyOeRVqVotQL4kWsUK+IV8VrYr94Hql9xvdLSL0hDoi3xHvSDPem+Arfx8Qb4V+IeDEez5HdGOdbxWy8/w9f4d1FCtbi34LLgr+ZJopaWSZfw7jeiVG5XEqsG50vaRMxYZ9hdd8R/NU0E9r32IfhdcfvDH7nKl+/rrmpcUnD4kUL6xfMn1c3t7amunLO7FkzZ5R7Pe6y0mklxVOnTD6vaFLhxAkF+Xm5OeNd2ePOHTtm9KiskSOGDxo4oH/fzIw+jt62tORES4I5NiY6KjIiHA8gKfrnOwoq7HpmhR6W6Zg4cYBKO3wI+E4KVOh2hApOLaPbK4xi9lNLulCy9rSSLirp6iwpLfaxYuyA/vZ8h11/Pc9h75DlJR74TXkOr10/YvjJhg/LNBJmJNLTUcOen1aXZ9dlhT1fL1ha58+vyEN77bExuY7cmpgB/UV7TCxsLJze19HQLvuOk4bR+uaPbsfj16wOq5sy8n3VenGJJz/Pmp7uNWIi12hLj8jVI4227PNUn8Vl9vb+e/2Xd1hEZYUzrtpR7Zvp0U0+VPKb8v3+DXqiU+/nyNP7rfwiDadco/d35OXrTgcaK5rWeQCph2dYHHb/LwKddxz55tSILxSJyLD8IpRVp9g5TMhnL9A39BDnl56u+nJZh0tUIqG3lngobReV1oBwDXJ6da1C5ezlnBS3ymnlnM7qFY50danyK0KfpXVpemulfUB/jL7xycAH+XbdlFlRWVWn1Ffjd+Tl0biVeXRXHozLFzrX/PbBg1DeV4GTmKeGocSjD3I06MmOHCqAgF1dg3mlHqNKqJqenKtj/xeqpQ/Kz1P9suf7K/Kog6otR4lnlxgaPNQ+zG7dPlQME17VDz01FxclM9/vqa7VbRXWatyftXaPNV13eTF8XoenxquuksOi9zuEw6UbRzRq4dxOK82F1ZlHZkTZPZrV5FVXCwF7Ab4cOWORYcHlMpLqiuaMtXukVXAxHCVUQrlT2kHClJE7UWWZVNXcidZ0bzq9ztAla6hP4Rl61EltWRDo7BMd50+7RqVVh/rZ82vyTurgKY2GhzoYau3f91NTYxE6MGpEqcs5kbNMGZi5iGloxgipq5hm10Wx3eOocXgduIdcxR51bmqsjetbVOooKin3GFc7dJeUnZKi/CxK6SId2ZzQcnEPFjitfFmN9AQj3ZmceFp2IWc7VL/8/up2YcpQt7K1XRomPPcyrz7V6XXolU5HuurngP7tUSIuvawiF3O1AMudo8DnsFvsBX5fR7C10t/ucvkb8ivqRmNe+B2F1X5HqWes1ej8NM9q60p17CRRJIvKctCUJnLaHXJjSbtLbiwt9+yyYN++scwT0KSWW5Hjbe+DPM8uuxAuI6qpqAqqhF0lVEvTkIgyylt3uYRoNXLDjICRruqQwohFcUyKqg6NYhY6UKZxIBf+fqjqCKMcF5cOQyyKYq1Uum+odBRyLCpnt8CDRBiZ9GoXaoBdMeGuKFe0K04zaxhSFQogshtlo6XYHifN0tqONqcZ4Q7Z2h7tsu4yWpoWKtmKkirW2hlDz1WxkxrC8ejE3SfOwF3u2R4n0L7xjRI56oW7MK0O9xCeJ/n2anX/rfLW+Su8avUQqbhX8ZG6dIwTuuYYhx5HxOkxjpocPdaRo+LZKp5N8QgVj8SdL1MlLrZadP0VDizEmDEeYZU010yqSXtHMFjmSX/desSbjrk0E5R79GgnHm7hGZNQboKiAuEJemuVT/VDuD2qbmRGYZUX85IbRJFCPRotRIdaQIkCo46ab6hUhXvN5zAswlg6Wr2616kO6pnnNearRRcTHaP1iExqMzxTHWiQ15/kOMdYfDDXYzI2KIlG30SphyJWJHEwLw1SZBx6XuVAVlWFne6RUsxleljEWClSgzU/LLPGIMYayhTqtEwZseYYPXogGsRH+diBas0Jz4j0eqnzRmpDqACObdFj0aPMk4YyVAGjg6xC1Rd8NqCrqujTqpmSDjHNsRxLp+q00VIksnVzRqEPTzeqH4uII4srR6lFMDbUxnMUjVRnHodxx5LQEdzmWJF+0gtrh3r6qftPWHdhogqv//SAPsM5oH/U6VGzEfb7o8z/vgKNV5S5U42gllGlngpQdcMZ95s9Xz0qHZPatSlOQ6Wh/kkOPEG0DAU2OiZMn3R7tVeVQpeLjbXsTwvJkwqpx7TRuN8yhlMylKKL6dfnnpqs60wWKLAZzBhIewicilprca/Mt+r1uDO5iLoidr/d4hjtUF9G5QmKClykzmmB2x93nZo0rVV2TyVudjRYUOEv8KstapUvNGyhI+mLnKc0iXkhcfOgIXU6emuxvcJrr8DWVJZ40tOtmI1Qey32qQ6fehQU0/kUlxtbFZ9f3eICOxWvVY/Eg6nWV+NIxxNEVysQjb7qY1ho2gir3+/w68a8LUBhNJ+JaVeoBJ8Gp8NXo7bQtWoHXWPULUB3jdFRrVnzHZjLNQgbY4mBw9JXqb6q/GqDPqvCiZFI9Cf57aP8WIJn4ekRllk1vQKPKvVEshuX2mdFCoNQqFJeNEQFozNUQZoCqjcLne2zIjNORIzPYicVjjJaRc+mefRiLmLMJ2WWOHWtaxYy1cnLaeUeXqdMKrsQw+vCXWVVte26VuYJXR6jfqGqauULRtUQMZ4hofnV+bTh59BMK8b0T+P4g0uI402mA+HxwiQixSgxWUwRN+jrnJ4n8CSYJlLFaPnooyl5eVEDIp+SueonM1mGR5mUua6EMM28s3v3bMfO4RGbTImFHXLAjuzITZomso8dPLZv0LGDR5JGDToiB31y+OBhyw/7EkcNGnr47cNDBltdyd3NO+tRdbhjZ/1wU8SmelNitqrviq7PdmmRm+rRSFq2s/s+575Bzn1ONOMcPMQrE9MTDZLjtcjI5AhH74Ha8LMyRwwdes44bfiwTEfveM2IDRsxcpxp6Dm9NFMyR8ZpKi1NB/4oN009FqGtcWRPHxreq3tCsjkiXOuRljRgbIaldEbG2IE9I02REabwqMi+I3N6F9Xn9/4wMrFnSmrPpKiopJ6pKT0TI499FB5/9Mfw+N9zw+p/v9YUMWZmdh/TjTFRWlhEREevtG5nj0kvnJ7QxRIW28WSmBoVmZQY1zdv5rH1KT1UGz1SUqitY5Oxt1C/N0aMPlz2ZcrDcxLG/iKio4y/bh//etVrSt8rXDb196PHWqO/iRoh1K+eGv/5q37EVL95xmz9/ejRrdHfnPjlMvQKC4s/6a/l/Ybs6Xyr0mGiVVjEWOOXUIsYJDYIkTSiz9ehXkWKcvWraZj6pbUZkJeiB1LkNREvNoe8CX9YbAn5MJQ5EPLhuIW+DfkI0UOGiTLjV60mYQ99+0CtWIy/7ZvhloV+86rrzG8WNcavXerXQh+YJ+rFCiN3kfFLlQ/pepSpFgMRzUM5u/H7omqtBSVqRLoY3/meJJwi16gzT1QarU1DibkoWW+0XowWCsToM9YYLQbjPQTHG2y8z1R2OlpXv2TOM87QHqp1phpqpI1XME39Zv6vr/Zo0/hS7SXtBZElbNqLIf1EZGkfCrf2AfQ96PshfRf6DvRt6FvQA9A3oXugT0GfhD4h3CJM+0gMA2XA1Omqwd3gbRAuFqAlKWJRX4pk7RmRB6pBM7gWhKPsU8i7Gy1KYdcu2RGdJidhEV7L5mI2F7FpZXMhmzVsVrNZxeYCNivZrGCznM0yNkvZtLBpZtPEZgmbBjaL2Sxis5BNPZsFbOazmcemjs1cNrVsathUs6liU8nGx6aCzRw2s9nMYjOTzQw25Wy8bDxszmcznY2bTRmbUjbT2JSwKWYzlc0UNpPZnMemiM0kNoVsJrKZwKaATT6bPDa5bHLYjGfjYpPNZhybc9mMZTOGzWg2o9hksRnJZgSb4WyGsRnK5hw2Q9gMZjOIzUA2A9j0Z+Nkczabfmz6sjmLTSabDDZ92DjY9GaTzsbOxsamF5uebHqwsbLpzqYbmzQ2Xdmksklhk8ymC5skNolsLGwS2MSzMbOJYxPLJoZNNJsoNpFsItiEswljY2KjsZFsRMjIIJvjbI6x+YPN72yOsvknm9/Y/IPNr2x+YfMzm5/Y/MjmBzbfs/mOzbdsjrD5hs3XbP7O5is2f2PzJZu/svkLmy/YfM7mMzaH2Rxi8ymbg2w+YfMxm4/YfMjmAzbvs3mPzbts3mHzNpu32Bxg8yabN9jsZ7OPzetsXmPzKptX2LzM5iU2L7J5gc3zbJ5j8yybZ9g8zWYvmz1snmLzJJsn2DzOZjebXWw62Oxk8xibR9nsYLOdTYBNOxudzSNsHmbzEJsH2bSxeYDN/WzuY7ONzb1s7mFzN5u72NzJ5g42W9nczmYLm9vY3MrmFjY3s7mJzY1sbmBzPZvr2FzL5ho2V7O5is1mNleyuYLNJjaXs7mMjZ/NpWw2stnAZj2bdWx42yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yN52yMb2fD+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/L+R/K2R/K2R/K2R/JuR/JuR/JuR/JuR/JuR/JuR/JuR/JuR/JuR+ZuV6ZDuyTQa5wNe+ZArxTIxZS6KNBrNKSVUheSrAn0ioOsptQqkgtIVpKsCPQcD1ke6JkLWUaylKSF8pop1UTSSMElgZ45kAaSxSSLqMhCknqSBYEe+ZD5JPNI6kjmktQGeuRBaihVTVJFUkniI6kgmUMym+rNotRMkhkk5SReEg/J+STTSdwkZSSlJNNISkiKSaaSTCGZTHIeSRHJpIC1EFJIMjFgnQSZQFIQsBZB8gPW8yB5JLkkOZQ3nuq5SLKp3jiSc0nGUskxJKOp+iiSLJKRJCNIhlNjw0iGUivnkAwhGUyNDSIZSPUGkPQncZKcTdKPpC/JWdR0JkkGtdmHxEHSm5pOJ7FTPRtJL5KeJD1IrCTdA92nQLqRpAW6T4V0JUmlYApJMgW7kCSRJFKehSSBgvEkZpI4yosliSGJprwokkiSiEC3Ykh4oFsJJIzEREGNUpJEGCKDJMeNIvIYpf4g+Z3kKOX9k1K/kfyD5FeSXwJpZZCfA2mlkJ8o9SPJDyTfU953lPqW5AjJN5T3NcnfKfgVyd9IviT5KxX5C6W+oNTnlPqM5DDJIcr7lOQgBT8h+ZjkI5IPqcgHlHqf5L1A1/Mh7wa6Toe8Q/I2Bd8iOUDyJskbVGQ/yT4Kvk7yGsmrJK9QkZdJXqLgiyQvkDxP8hzJs1TyGUo9TbKXZA/lPUXyJAWfIHmcZDfJLpIOKrmTUo+RPEqyg2R7IDUbEgikzoC0k+gkj5A8TPIQyYMkbSQPBFKxXsv7qZX7SLZR3r0k95DcTXIXyZ0kd5BsJbmdGttCrdxGcivl3UJyM8lNJDdShRsodT3JdSTXUt411MrVJFdR3maSK0muINlEcjmVvIxSfpJLSTaSbCBZH0jxQdYFUiohl5CsDaTUQi4muSiQ4oa0BlKwGMsLAykjIGtIVlP1VVTvApKVgZRqyAqqvpxkGclSkhaSZpImarqRqi8haQikVEEWU2OLqORCknqSBSTzSeZRvTqSudSzWqpeQ1JNJatIKkl8JBUkc0hm00nPop7NJJlBJ11OTXvpQB6S86m70+lAbmqljKSUZBpJSSDZBSkOJKsjTA0kq9t7SiB5LWRyIHkA5DwqUkQyKZCMfYEspNREkgkULAgkr4HkB5I3QPICyRdCcgPJrZCcQFIBZDyJiySbZFwgCc93eS6lxgYSvZAxJKMDierWGEWSFUicABkZSPRARgQSyyHDKW8YydBAYn/IOVRySCBRndjgQKKam4NIBlL1AXSE/iROauxskn7UWF+Ss0gySTICiWqU+pA4qM3e1GY6NWanVmwkvaheT5IeJFaS7iTdApZZkLSAZTaka8AyB5JKkkKSTNKFJIkqJFIFCwUTSOJJzCRxVDKWSsZQMJokiiSSJIJKhlPJMAqaSDQSSSJcwYRKm+J4QpXtWEK17Q/438FR8E/EfkPsH+BX8Av4GfGfwI/I+wHp78F34FtwBPFvwNfI+zvSX4G/gS/BX+Pn2v4SX2f7AnwOPgOHETsE/RQcBJ8g/TH0I/Ah+AC8b15ge888xPYu9B1zve1tc6btLXAA/k2z0/YG2A/2If91xF4zL7S9Cv8K/MvwL5nn2140z7O9YK6zPW+ea3sOdZ9Fe8+Ap4EruBffe8BT4Mm4JbYn4hptj8c12XbHNdt2gQ6wE/HHwKPI24G87YgFQDvQwSOxK2wPx660PRS7yvZg7GpbW+wa2wPgfnAf2AbuBffEDrDdDb0L3Ik6d0C3xi6w3Q6/Bf42cCv8LWjrZrR1E9q6EbEbwPXgOnAtuAZcjXpXob3NMVNsV8ZMtV0RM9e2KeYe2+Ux22zrTBm2S0xZtrUyy3axu9V9UVur+0L3aveattXu2NUydrV1ddHqC1a3rf5otSspImaVe6X7graV7hXuZe7lbcvcu7X1olZb5xrrXtrW4g5rSW5pbjH93CLbWmReixzcIjXRYmmxt5jimt2N7qa2RrdoLG5sbdQbw8bojYcaNdEoYzqCe7c3WnsVQF2rGs2WgiXuxe6GtsXuRbUL3fPRwXlZc911bXPdtVnV7pq2andVVqXbl1XhnpM1yz27bZZ7Zla5e0Zbudub5XGfj/LTs8rc7rYyd2lWiXtaW4l7atYU9xTEJ2cVuc9rK3JPyproLmyb6J6QVeDOx8mLHpYe9h4mi+rAlB7oibDKnMFWl/WQ9XtrmLDq1r1WU1JCd1t3rV9CN5k7tZtc3O3Cbld2MyWk7U/TXGn9+hckdN3f9dOu33UN6+Lq2m9ggUi1pNpTTSnq3FInlxUYmp1HOmS4ca62VEdmQUKKTEixpWj536XI9cIk7VIKaYGYolBmh0yxFZieNP5hLlxIuVmUOYs6osS0Ij2qeIYuN+oZperbVVKuR2zUhbt8hqddyiu8xv8j0pPVfwQz0us2bRI9c4r0nqWegGnr1p453iK9VXmXy/BB5QWKeJ2zm1qanB7XuSLxUOL3iaaUPZb9Fi0hQSYkBBM0VwI6nxBvi9fUVzDe5IofMrIgwWwza+oraDalusyIqPM7K664rCAh1harubNjp8Zqrtjs3AJX7IDBBf9yntvVedKRnc2z8TW7qdlpfJDyyhaVdKqo+jQ1I63eLUZaOM/4omKQOU14NXOw+cy1/r+/5H+6A//9L/rfd+OD2iWiWlsLLgYXgVZwIVgDVoNV4AKwEqwAy8EysBS0gGbQBJaABrAYLAILQT1YAOaDeaAOzAW1oAZUgypQCXygAswBs8EsMBPMAOXACzzgfDAduEEZKAXTQAkoBlPBFDAZnAeKwCRQCCaCCaAA5IM8kAtywHjgAtlgHDgXjAVjwGgwCmSBkWAEGA6GgaHgHDAEDAaDwEAwAPQHTnA26Af6grNAJsgAfYAD9AbpwA5soBfoCXoAK+gOuoE00BWkghSQDLqAJJAILCABxAMziAOxIAZEgygQCSJAOAgbH8S3CWhAAiGqJWLyODgG/gC/g6Pgn+A38A/wK/gF/Ax+Aj+CH8D34DvwLTgCvgFfg7+Dr8DfwJfgr+Av4AvwOfgMHAaHwKfgIPgEfAw+Ah+CD8D74D3wLngHvA3eAgfAm+ANsB/sA6+D18Cr4BXwMngJvAheAM+D58Cz4BnwNNgL9oCnwJPgCfA42A12gQ6wEzwGHgU7wHYQAO1AB4+Ah8FD4EHQBh4A94P7wDZwL7gH3A3uAneCO8BWcDvYAm4Dt4JbwM3gJnAjuAFcD64D14JrwNXgKrAZXAmuAJvA5eAy4AeXgo1gA1gP1onq8a0S819i/kvMf4n5LzH/Jea/xPyXmP8S819i/kvMf4n5LzH/Jea/xPyXmP8S819i/stGgDVAYg2QWAMk1gCJNUBiDZBYAyTWAIk1QGINkFgDJNYAiTVAYg2QWAMk1gCJNUBiDZBYAyTWAIk1QGINkFgDJNYAiTVAYg2QWAMk1gCJNUBiDZBYAyTWAIn5LzH/Jea/xNyXmPsSc19i7kvMfYm5LzH3Jea+xNyXmPv/6XX4v/zl/U934L/8JZqaTtqYqVfanNnifwDjIlBPDQplbmRzdHJlYW0NCmVuZG9iag0KOSAwIG9iag0KWyAyMjYgXQ0KZW5kb2JqDQoxMCAwIG9iag0KPDwNCi9UeXBlIC9Gb250DQovU3VidHlwZSAvVHJ1ZVR5cGUNCi9CYXNlRm9udCAvQUFBQUFKK0NhbGlicmkjMjBMaWdodA0KL0VuY29kaW5nIC9XaW5BbnNpRW5jb2RpbmcNCi9Gb250RGVzY3JpcHRvciAxMSAwIFINCi9GaXJzdENoYXIgMzINCi9MYXN0Q2hhciAzMg0KL1dpZHRocyA5IDAgUg0KPj4NCmVuZG9iag0KMTEgMCBvYmoNCjw8DQovVHlwZSAvRm9udERlc2NyaXB0b3INCi9Gb250TmFtZSAvQUFBQUFKK0NhbGlicmkjMjBMaWdodA0KL0ZsYWdzIDMyDQovSXRhbGljQW5nbGUgMA0KL0FzY2VudCA3NTANCi9EZXNjZW50IC0yNTANCi9DYXBIZWlnaHQgNzUwDQovQXZnV2lkdGggNTIwDQovTWF4V2lkdGggMTgyMA0KL0ZvbnRXZWlnaHQgMzAwDQovWEhlaWdodCAyNTANCi9TdGVtViA1Mg0KL0ZvbnRCQm94IFsgLTUxMSAtMjUwIDEzMDkgNzUwIF0NCi9Gb250RmlsZTIgMTIgMCBSDQo+Pg0KZW5kb2JqDQoxMiAwIG9iag0KPDwNCi9MZW5ndGgxIDQ3MTINCi9GaWx0ZXIgL0ZsYXRlRGVjb2RlDQovTGVuZ3RoIDI5NDMNCj4+DQpzdHJlYW0NCniczVd7cFTlFT/fvftiE5INBEjN4HfDTWIwjw0khBBCcrPPhBXI69LdBGE3yYaNsmRJQgKRyIoacMVKx3aKD8BWamfcUe+GdiakWmm0FTuATB/aUmHQOtOxI07VwXFEsj3f3d1UsO04/tXv3u+ec37n8Z3vce+eBQIAcyEMPDRvaDMvP3Lvagsi72D3dgd9IVIRvwRAalGu7B4eEuo/bR5HOQTAHe4NbQ2Grj4wBqAxAOhe3bptd+9H2WfmAxjPoM3tAb+vRxd9YjFA2ufoXxVAIKOIvwCQXo5yfiA4tEt7EcpQbkfZtK2/20duJ6+g3IOyMejbFeLX6PejjOOBsN0X9Avv1WSjfAjjPxfqHxyamYEAQAbLTwgN+EOX9zUtQ3kT5mQEjWYpKQEtGLSPayvQ49YE5c/DOAcG4DJ5juM0PKd5H8ripyD/HowyBzusaxMEXBgBntbBDJDX9Ee5QgFInOn4CW0GGw0wDyC4bmwF00EDRUh1SAlwzDMeV62Qxv8W71atsOmPaoP85MxjjNdmXL8A36Y5YTMMwzPQCoPfyj/ZtMOQxscwZ9yx+BfxKzPPYp/E2f0bUfPULEYkK+ETnxP/CC3mq1imavUxs5qZ5C2gU33Trr+O6FXUFfBzUJ4br0L5U24/4xMe+qMzL878TNWmaVaSJ3Ed2qAGGuAOaMe5ybAF7oZ7UV6LfBeMIu2EbbAT9oEVXLAR9b0QxDXYC0/hOpyC36OnjJ5bIQQj6LkfDsGPIApvwJ3Qg5ZDcA9E4MfwMp6WHRjvfjgIh1F/ZzLO80hDsBvfg4fg+/AEahpRx0bcgPa7MEYE7sLRDqHfCNr+3zVtByzAs/Z53DLzk+sv8QV8OjmDc96PM9qJc/kCurTZcLe2JP4ZWRL/WGuMf6jZG/+YLIt/AkZ+D98rSX633N7W2tK8Yf26O1xrmxqdDrvNammQ6uvW1K6uWVW9smqFuay0pKiwIF9cQnOys0yZc9OMcwx6nRZfIQIldtHhFZRCr6IpFBsbS5ks+hDwfQXwKgJCjhttFMGrmgk3Wkpo2XuTpZSwlGYtiUmohdrSEsEuCspZmyhMko4WN/KP2ESPoFxR+XUqrylUhbko5OWhh2DPCdgEhXgFu+IYDkTsXhvGi6UZraLVbywtgZgxDdk05JQiMRQjRXVEZbgie00MPyBz2bAKX2D39SjNLW67LTcvz6NiYFVjKTqroldjCX0sZ3hYiJWcihycNEGXtzi9R+zxbXIrvA+dIrw9EtmvZBUrS0WbsnT0/Rycsl8pEW12pVjEYK7W2QGIoi0wiULkKmDy4pUPb0R8SURXYLoKjGVTnF0m1Kd4wNwwQ5xfXh7L5eFJCbpQUMIt7oQsQFfuBEjmYo/CeZnmVEqzQGaacEoz6+4V89hW2b3JeziQo4S7hNISXH31LsAb9YLCF3q7ugOM+vwR0WZLrFu7W5FsyEi+5FztsXIz2vu8OIk+tgwtbsUshpRs0ZIwQEBge9DX5lZdkm5KtlXBX7Ckl2K221hegj3itSUSZLHEFvdJqIhfjlUKuScqoBI8LA9loRU3pdAecff0KtSb24Pns1dw5+YpkgeXzyO6/R62S6JJWXoZh8tTR1S9cG43WaeM2cz1BQbBzeXyHrZbCAgOfIiWWlSYcLtUke2opVZwk1xImeEoSQvG3RAHBb7A2shUPHO1NubmefIS7X+klJvMSVugGL4Sy4TAbE6Jcf5raglrltBSwe63fSXBG4Jqkwkmo/3nPDm2FsmB0cPAtrMxpeIL8M1FjMMwKsR2MUdQoFlwi37RI+IZkprdbG5srdX9dbWJrpYOt7rbyVPSfoOU0FfP6pKcwlnxADqKc1N7qspOVZ4VG29SN6XUQsQgutoiLLKYDAgCvj44Y11hk+/h6nmV+F468NMmOnyiYBIcEd9kPNwViUlSJGT3BmpYDLGpJyK2uWtz1dRa3WO5o2yoeeAirnZLaQl+eCwxkRxoiUnkQFuH+6QJq4wD7e4JjnBWr8UTy0ed+6QAIKkox1AGMkFgAovUioJBtc89KQGEVa1GBVS5e5KAihlSGIHuSS6BmVIYh5gmgUkqxhruUE4A1xe/tXahh+3NHk8g4vWwNwsW4j7iTRQi1oHCiXUxwunSFaPotyhpooXh9QyvT+A6huvxVJCFBFfTHhBTayXaAz7/BBCyYL5YHSOQVVWKhQqrJfmzWIXwoIdVsA7WSvmleq5mwpbx/CIbXhwRXjBoCEcNhBdX6PiW72Q11WsImC9eunjpbD32rHmrVhHzxYuXrjDObDZdweviufJlJCsvS+3ZGZxen60Tl5RxK26rrKqoWF7HragsFJdkcCpWWbWyjq9YfivHZ6eQOk6Vz37p49u+/Iy7L7/BXalduMCYYdRqblmQvayhKMvddVt9uaDn9Vpea9AXrbTm2XutSy7rMhZlzcvJ1Okyc+ZlLcrACuuLT7QZ16o1+67dyy+s3SyJ5DmDntNoNacXLcgtk/KbN2UtyOLnZKanzzfo58+bW2jpuL4nFSFJWd3K6lFdzbvK3/8wd0tm7VVIM6h1xBvvHAkx+nbTyMZrH1y/YNylPwqsKuaShQZhRS6riY1nr31wzWDclapsZ5tGk8H2IWn+pkp+OHsxaw08BonhODCBmdVT3JTu1aSLHjpYVa1hlfgQ9gRPsL4eSvIcZGDdl+B5kOC5JM9q8H8keS0sJPOSvA6KSBFWlgHow4pZSD592HuhH7ZjXAGrOqbtxmdKPwR+rA1DaDGAtgOIbsMKkWm3o34IsW14+bE2LEPUhnYCavrVaDvRwg95WMGmrrVQjLUr8+nDipZFE7Bm7cOKNYAerWi9Fb22qSM1YzSHWg9/M+8aKMdrGeZRrl7f1G8jjjqAmfapqyAkI3xTb7Yzapu5xv6Dfb3F5pgbMvCvYz12jqwiVVANlFQn6UpSNVFNzzfUoUxII1QTJ8jEgdSO1IbUitSCtAGphLQeqRlpGdJSpCVY8oeJC49GmKzFGE0JHWzASAT+ifZ42MgaKMfOqVwIexj7Zeya+Cmy5kRGlgMwyUo0qkRVJZzHrkHjChCwh0nFBJ9ubkgnyzBYJj4p9n7se7E/SpZNaDNhkpRJT5Ls947H6buxOP3rD3bQv7xdRi+81Uf//Mcj9O23Suif3lpJz5+7hb55LkDPnnuBnjkXppnnSJCeI0hW/+70PvrG6YP09dNV9LfT6+lvpt30tekt9NXpXvrr6SA9NR2mMG2aFqb5oDBdPs0xlmMIt1qYJq9MFdJfTdXQl6da6UtTQfrLqUF6cup+Ojm1mzZPkcn4qRNTo/scKg1sT1C5I0EtDkal+JR5ueMXMRf9eexOeiLWTSdid1ElNkJfjO2jL8Q66bPHd9CfHh+lzxw/SI8dWUyPHllFnzryGH38sEwPHyynEfKQ/CBfTB/gnXRfZ1i+LxqW93aOyfdGx2TzGDGP1Y/1jx0be3MsPqbb3Tki74qOyHTk0ZFjI/wIGZX3dI7K90RH5dAoOdA5Lu+Pjst0/NHxY+P8OD8gNw97h7lhZLb3BmUlSLYE+4N7g3wQkaHOAXkwOiBLA96B0EB4QDPA9cs7OvvlULRf7tcRehcm1efcKgeiW+VeZ4/sj/bI3c4u2ef0ypKXbHJ2yJ3RDmmt/F003Ohsl+Vou9zmbJFboy1yi85BNzjXy+v5ArrO6ZLviLrktc5GuSnaKDdyxdTpdMgOUkzzlxipuCSHAk8M/Mvq11WLJ/IQtBe7JvXxVpdiaO5UyAGloI09pZYORXdAAbmj0x0j5HueiVvw17tdrUpU+cFHHoHFFpeyuM09wT/99GKLx6WEGS9JKh9nPKCJZ/Ng8dfb4E384CCjg0kB76FZNcEOSVqc5IuLU3qyc/Pg0M7UGKodAgkZZp1JMWweVHEcZIg9UgkwOpSzGeBf+Btylg0KZW5kc3RyZWFtDQplbmRvYmoNCjEzIDAgb2JqDQo8PA0KL1R5cGUgL0ZvbnQNCi9TdWJ0eXBlIC9UeXBlMA0KL0Jhc2VGb250IC9BVE5DWVQrQ2FsaWJyaSMyMExpZ2h0DQovRW5jb2RpbmcgL0lkZW50aXR5LUgNCi9EZXNjZW5kYW50Rm9udHMgMTQgMCBSDQovVG9Vbmljb2RlIDIwIDAgUg0KPj4NCmVuZG9iag0KMTQgMCBvYmoNClsgMTUgMCBSIF0NCmVuZG9iag0KMTUgMCBvYmoNCjw8DQovQmFzZUZvbnQgL0FUTkNZVCtDYWxpYnJpIzIwTGlnaHQNCi9TdWJ0eXBlIC9DSURGb250VHlwZTINCi9UeXBlIC9Gb250DQovQ0lEVG9HSURNYXAgL0lkZW50aXR5DQovRFcgMTAwMA0KL0NJRFN5c3RlbUluZm8gMTYgMCBSDQovRm9udERlc2NyaXB0b3IgMTcgMCBSDQovVyAxOSAwIFINCj4+DQplbmRvYmoNCjE2IDAgb2JqDQo8PA0KL09yZGVyaW5nIChJZGVudGl0eSkNCi9SZWdpc3RyeSAoQWRvYmUpDQovU3VwcGxlbWVudCAwDQo+Pg0KZW5kb2JqDQoxNyAwIG9iag0KPDwNCi9UeXBlIC9Gb250RGVzY3JpcHRvcg0KL0ZvbnROYW1lIC9BVE5DWVQrQ2FsaWJyaSMyMExpZ2h0DQovRmxhZ3MgMzINCi9JdGFsaWNBbmdsZSAwDQovQXNjZW50IDc1MA0KL0Rlc2NlbnQgLTI1MA0KL0NhcEhlaWdodCA3NTANCi9BdmdXaWR0aCA1MjANCi9NYXhXaWR0aCAxODIwDQovRm9udFdlaWdodCAzMDANCi9YSGVpZ2h0IDI1MA0KL1N0ZW1WIDUyDQovRm9udEJCb3ggWyAtNTExIC0yNTAgMTMwOSA3NTAgXQ0KL0ZvbnRGaWxlMiAxOCAwIFINCj4+DQplbmRvYmoNCjE4IDAgb2JqDQo8PA0KL0xlbmd0aDEgNzk5Mg0KL0ZpbHRlciAvRmxhdGVEZWNvZGUNCi9MZW5ndGggMzc3OQ0KPj4NCnN0cmVhbQ0KeJztOW1QG2d6z7u72hUCCYQFBsv2rljAYAEyHwaMiSVAQmD8AYZNBARbwoAhMQYDNvgDm/PlbEexG3fSNs45dnIJl8yEudyKtBlMLj0fcXtJJ3YyndRp09rju96f6xy95u5809pn1OddSdT25TqZm0mbtPeu3n2+n/f5eHe1KwEBgASYABZcW5sdRee3+/cg532c/p37RyTnLxuPA5A8AOZsz+Cu/sFbT4wDsJcB+Hd27T7Qk+6u+g8Aw0kA7s3e7kAXP/XNFQCJLrQv7UWGKUe3F+kxpDN7+0fGNrzKDyD9PNrv3j2wM/D9xh9MAaTq0Wd5f2BskPtIOAGQTu2lPYH+btvOCtRN92MMrw0ODI8sLEAvgDWBygeHugdvHqsvRBrj4wzAcbkYqQ70uud0xWixMgLZD+E4A3pgElmGYTiW4X4CBeFLkHkIvcThhM3NkkQLkfU+DwtALgsXmGwJSJjK2Gmdia4GFuGCrp+dWXiGcnWmu5/A7zO8sB32w8uwDYZ/L/vo0O2HeDYEPCwBCN8Ozy+8gnMGI/0vjhYntwI55ohNOC78r6ixROMlalqfUq2FGbYaeM02/u4PkXsLZVlsHNLGcCnSv2ROUDxiIVxY+O7Cq5o0nisj57AOzVABVbAJWjA3BXbA43AE6Y2Id8JBhO2wG/bBMaiBBngY5T3QjzU4Cs9jHS7B36Klgpa7YBBG0fIEnIFnYQregw7oQs0ROARB+Ba8jZ3fi/6+DqfgLMo7on6+g3AQDuAefhL+GL6JkjqU0RW3ov4Y+gjCY7jaGbQbRd0v3dC1QQq8GP73cPXCS3e/x2axCeR9zPkEZrQPc7kNnToLPK7LC/+aZIQ/1RnCP+OOhj8lheFfgIE9zPa4XN0+paV5W1Pj1i2bNzVsrK/z1nrcNdVVLueGhyrXV6wrLytd6yjIz8vJzsqUM8Q0izkp0RhviNMLvA4vBwJ5HrnWL6nZfpXLluvq8iktB5ARuIfhVyVk1d6vo0p+TU26X9OFmj0PaLoimq5FTZIkVUJlfp7kkSX1iluWZkhbkw/x0265VVLnNXyzhnPZGmFEwmZDC8mT1uuWVOKXPGrt/t6gx+9Gf6F4Q41c023Iz4OQIR7ReMTUHHkwRHI2EA1hcjwVIbwZGOmyKpvlCXSpjU0+j9tqs7VqPKjRfKl8jSpovqQ+GjM8JYXyLgVPzSRBp9+e0CV3BR71qWwAjYKsJxg8oZrtaq7sVnMP/iQNU+5W82S3R7XL6Kxh2+ICRNVlJclS8BZg8PL8z+7nBKIcPivpFlCUprhYJpTHcMDYMELMz2ajsTw144JOJNSJJl+ElqDTOg0uh71VZfxUcikmSVGoZCImWTT3yzbaKo8/+tnfm6ZOdEr5eVh97ZOFH5RLKpvt79zZS2GgOyi73ZG6tfhUlxsRVyCaqye0xoH6AT8m0UfL0ORTHfKgapGrIwrIkGgP+pp9mknUTLXUqPjtE7VSHR43jUvyBP3uSIDUl9zkuwjF4ZuhEsn6RjGUQCuNQ02twaZke4K+rh5V9Fu7cH/2SD6rTXW1YvlaZV93K+2SnKTm3sTlbNqKmhXm9oB2TJlmLmTpJR9jZVtpt5Ah1eJJrq5EQRK2SyNpR6srJR+xQkwNV4lqUOw+P0iwWTV1VMRS05o6q63VFhn/TUjWaEy6LFV/j68kZCzGFFnnd4YW0aYB5Uqebvc9Ad7nVBcNMOrts+NkaC2iC6OFnrazLiZis/DKRR6DbjQW7WKapEKj5JO75VYZ95Cr0Udzo7XW+tvQLDc0tfm0bkd3Sct9VEReviiLYipTgxuw1m6N9VSjvRq9SNY9IK6PiaWgXm5oDlLPctQhSHj5YMZ8dn3gqfLkErwua/HWJtcGZClJqg0GZsITncGQyxUc9Ph7K6gPub4rKDf7Kq1aaNt849aDdKlkaCANLdX5eXjjqQ7J5GRTyEVONrf5Libhc8XJFt80Q5gaf3VrKBNlvosSgEvjMpRLmZSQKEE9bUNCr+lbL7oAJjQppzE0eucMAY2nj/EI7JxhIrykGI9BHhfhuTQeHdihtF6sL95rPVIX7c3h1t6gv5VeWZCKfcQPUYm8AVRG3hAiDJ+gGuTuajVerqZ8J+U7I3ye8gXcFSSVYDU9vXKsVrKnN9A9DYSkLJHLQwTMpfn4oAIF+Kx1BZ9CWBBgHWyGja7MfIGpmHabvrPUjQdDpNf1HGFEPWHltTzblG6ud3IEHNdvXL9xxYnTnLxuHXFcv35jnmIOR9I8HtevrikkZptZmxYTIwgWXs4oYNauKiktLi7awKwtyZYzTIzGKykt28AWF61kWEuMs4HR6Cu/CbDNv/k187XMKl+JLjXFYDLouGUplsKqHLOvc5VzjSSwgo7V6YWcshqbp6cm4yZvWmpOTkvk+cS0ZPNSEz5h3f6FznSnnDt25wibWrndJZPX9ALD6bh3l6ZYC1yZjY+aU8xsXGJCwhK9sCTZmF3ddvdwzEMU4mMtmMO3tUplwDJXAvBzaWY+eXZFU4ICTud8EXFcvnsFc6YZ2MyxPMy2WDY2LR1OnyAsHOFNaWZzmolfOKKP13McntgjQgJi14wWo3BnmDfwHEdPpwVkmFJMgmBKwb3TG/45+yQ7B3a88e50Ve0vPF7IjBWQZ3NfzWX+LOeVHCZOTpeZODFdZPQ9wn6BWbLEljcNdmIv4aZta/Ne5rjljsnsjWmTpoy4yeWbwXn3V/PO+eR1jnmSdGO+6HoHxdcUdmzv0AbBntksKxnaL9qOFIuJv7c9KatKtSYK7JPZyXeftW062OrsqncYMHSWYXlDScuAq++lPevW7zm3o+dMh/0QG3zCvcubzTJCprXlZKAk1ZrKGy2JAj4WGdLTLc5Db44Nv3m0xj18tiX+zEvFLQOVWHcl/HPmLcy6HnpcG07UPVvHLMsm8dkkhSEcQ6rUzMyiogRriLYoYWPBZJnh22Z/2WAZ02gmZeYyc2rlZJVVl7sxdVKHCc87cY/Om+k+7eigOxUT/0hLu8gxj5lH0ta6x8XSjGzXAj5K8ynR7tLUUywreeatNa2HGxwtbkeqgbYtfrXzkXUFm8rFnKrmR5qrcjIb9jVm1JTlpAi0KnG8Xiqpczi8BUtzqlseaanOIbqqXXXZiUuXWVamGy0mYbltuSXHuXp1hd0mr65sWe9or8uLT05Jik8w4x41CanLUlNzSqW8yryMjNyKJpr4qvCnTDv3Gr4RKK5yQ5Ixqc5uWG9oMLBGwwoDI+eHloIxycgYjebcXEg0i2aneauZ05vzJ+X6FcbJpfWFk4JWnfkrznni2N5xuciBNekoni+iRbFnWUxcZEPLGdlaHYoXN0FKZGvwsmy2pMa2CtMuJK7IXm2p2V5pPWFKwj0unNDRK3Opkb8t4K43G2+v35K2amWKXqfXsRtTliUa43SZ9YObmOL0dOMSI3+DNwgsKxgQQTI9/e71XbsNCQYu3pwuAn1t5Ct+dPX0cmFHYuUtiNdrz/Tv/dP5QQo/rh99+M5P735iGBMuAH3bZKIP/WgXedc0XLnz0zt6w5jm6Z5BznEmek+MUh98wS8hX4HBz+E74P/iYG/E3qS/+oPbDOq9NDt2P/1lG7offzHxsR88UIeHYNNn6nlh+Rex/pdhcDnw+L00+yv6G9sfxldtMHPw6r00mwbKZ+npnrufz3wLViH40/8jx7U/HP/TB2n6f3D8828fTDt9aiPn4BmIPPYxkAQO+hszM8u/E728BGjDd1rg6D8NI/Sy1HACOUhFcAZM8HwUZ8EFr0VxDnX+JYrrIJUkR3EeckgOtOBdug+GQYqeAzh7YAD2oF8JRjXpTjzH5CPQDf0wiBpDqDuE3N1wQJPuQfkI8nbj0Q1d+NQpgRv1JJQMaN72oUY32KAKV90CNdCK0I6Q2vRBp+ZNwm/OPtiFK47ANtTehVa7tZUa0Vut9h/B57OugDV4FGIca7Tj89o9jKsOYaR9WhWkqIfPa611ho6FO5/9/ReKc1SZSCU4cTJkHSmFchBJeRSWkdLpcvHDqg1IE1IH5cQLCqlF6EHoRliDsBphFUIXQidCB8IChPkI8/C2PEEacGtMkI3ooz4ig63oicC/oT7dbA/BGpyMhg3inMB5EycXvkQeesNkrgUMsgSVSlBUAh/i5FC5GCScE6R4mk1wVCWQQnSWiGcR5wDOozifJoXTukSYIQWuc8Ty48mw+KNQWPzHP9kr/sPHBeIn1/rEv//ovPjxtTzx766ViR9eXSZ+cLVXvHL1dfH9qxNi4lXSL14lCNb/zbvHxPfePSX+8N1S8a/ntoh/NecTL8/tEN+Z6xF/MNcvXpqbEGEuaU6aY/uluTVzDEUZymHWS3Pk+7PZ4l/OVohvz24TvzfbL741OyxenP26ODN7QGycJTPhS2/MHjxWq8HePRGotEVgdS2FrvCso6j2L0IN4p+HOsQ3QjvF6dBjohoaFb8bOia+HmoXX5ncK3578qD48uQp8YXzK8QL59eJz59/RnzurCKePbVGDJInlW+wdvEJ1isea59QvjY1oRxtH1eOTI0rjnHiGHeOD4y/MP7BeHicP9A+qoxNjSri6NOjL4yyo+Sgcrj9oHJo6qAyeJCcbD+unJg6rojHnz7+wnH2ODukNO7372f2I7Knp19R+8mO/oH+o/1sP3JG2oeU4akhxTXkHxocmhjihpgBZW/7gDI4NaAM8ER8DIPq8+5Seqd2KT3eLqV7qkvZ6e1UAl6/4vKTR71tSvtUm2uj8ggqPuxtUZSpFqXZ26Rsm2pSmvhacat3i7KFzRI3exuUTVMNykZvnVI/VafUMXbR661VaoldzMwwiHJGmggs0bNvE7rxdLgjz0CLvWFGCG9rUPWN7So5qWY107OrqU3lT6qgtLX7QoT8Uev0MsLUtGi/1Gr0N06fhhXVDeqKZt80++KLK6pbG9QJirtcGh6mOKBK6/Zh+2+P4Qfw4WEKh6MEfkYWxQQnRKE9itvtMTnZt314ZF9sDU0PGREaFo2JHbYPa3xcZISeYgFQOJK2HeA/AatLMCMNCmVuZHN0cmVhbQ0KZW5kb2JqDQoxOSAwIG9iag0KWyAwIFsgNTA3IF0gMyBbIDIyNiBdIDEwMCBbIDQ4MyBdIDI4NiBbIDQ5NCBdIDQwMCBbIDM4NyBdIDQxMCBbIDMyOSBdIF0NCmVuZG9iag0KMjAgMCBvYmoNCjw8DQovRmlsdGVyIC9GbGF0ZURlY29kZQ0KL0xlbmd0aCAyNDYNCj4+DQpzdHJlYW0NCnicXZDdasQgEIXvfYq53F4smja7pRCEZdtCLvpD0z6A0UkqNCrGXOTtO5plCx1Q+Jg5Zw7Dz+1j62wC/h697jDBYJ2JOPslaoQeR+tYJcBYnS5Ufj2pwDiJu3VOOLVu8KxpgH9Qc05xhd3J+B5vGH+LBqN1I+y+zh1xt4TwgxO6BIJJCQYHMnpR4VVNCLzI9q2hvk3rnjR/E59rQLgtXG1htDc4B6UxKjciawSVhOaZSjJ05l+/3lT9oL9VzNPHmqaFONSSqKqeCh0PhR5Eofu7jU4b1cX34pA35ENc4+slRkperlUi57DW4fWgwYesyu8XBfd3Xg0KZW5kc3RyZWFtDQplbmRvYmoNCjIxIDAgb2JqDQo8PA0KL0ZpbHRlciAvRmxhdGVEZWNvZGUNCi9MZW5ndGggMTU4DQo+Pg0Kc3RyZWFtDQp4nH2QPQsCMQyG9/6KjLqkSfqRFo6CB1fBUbqJm+ju/x+8A/ED7kqGJ/CENyRjMwRLPR/v5nw0tjIwI3lod6OESTxonAntZi472F+hnczUzNg+2iUUWfG2Cohijj9ZMWcMa2FMcUnZ9p4x9rwqUscLC/rQ8V4xdbyt7nuMJIfyNzwQRV+YwkDMU+E0M1NxvPBQtr7iJKC6ja0vExxWiQ0KZW5kc3RyZWFtDQplbmRvYmoNCjEgMCBvYmoNCjw8DQovVHlwZSAvUGFnZXMNCi9LaWRzIFsgNSAwIFIgXQ0KL0NvdW50IDENCj4+DQplbmRvYmoNCjIgMCBvYmoNCjw8DQovQXV0aG9yIChHdXN0YXZzc29uLCBTdGlhbikNCi9DcmVhdG9yDQo8RkVGRjAwNEQwMDY5MDA2MzAwNzIwMDZGMDA3MzAwNkYwMDY2MDA3NDAwQUUwMDIwMDA1NzAwNkYwMDcyMDA2NDAwMjAwMDMyMDAzMDAwMzEwMDMzPg0KL0NyZWF0aW9uRGF0ZSAoRDoyMDIwMDYxOTE0MDAzNyswMicwMCcpDQovTW9kRGF0ZSAoRDoyMDIwMDYyMzEyNDAzNCswMicwMCcpDQovUHJvZHVjZXINCigzLUhlaWdodHNcKFRNXCkgUERGIE9wdGltaXphdGlvbiBTaGVsbCA1LjkuMS41IFwoaHR0cDovL3d3dy5wZGYtdG9vbHMuY29tXCkpDQo+Pg0KZW5kb2JqDQp4cmVmDQowIDMNCjAwMDAwMDAwMDAgNjU1MzUgZg0KMDAwMDAxNzc3NiAwMDAwMCBuDQowMDAwMDE3ODQyIDAwMDAwIG4NCnRyYWlsZXINCjw8DQovU2l6ZSAzDQovSUQgWzw3M2U2YTI1ZWZkMGYwMWU0ZjUzY2ZiMmFmZDNkZjg0ZT48NzNlNmEyNWVmZDBmMDFlNGY1M2NmYjJhZmQzZGY4NGU+XQ0KPj4NCnN0YXJ0eHJlZg0KMTc4DQolJUVPRg0K"; } + + private PdfVedlegg() { + throw new IllegalStateException("Utility class"); + } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/MedlConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/MedlConsumer.java index ea379e6b73a..5f39b8cde8c 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/MedlConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/MedlConsumer.java @@ -3,9 +3,9 @@ import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import no.nav.dolly.bestilling.ConsumerStatus; +import no.nav.dolly.bestilling.medl.command.MedlGetCommand; import no.nav.dolly.bestilling.medl.command.MedlPostCommand; import no.nav.dolly.bestilling.medl.command.MedlPutCommand; -import no.nav.dolly.bestilling.medl.command.getMedldataCommand; import no.nav.dolly.bestilling.medl.dto.MedlPostResponse; import no.nav.dolly.config.credentials.MedlProxyProperties; import no.nav.dolly.domain.resultset.medl.MedlData; @@ -68,7 +68,7 @@ public Flux getMedlemskapsperioder(List identer) { return tokenService.exchange(serviceProperties) .flatMapMany(token -> Flux.fromIterable(identer) .delayElements(Duration.ofMillis(100)) - .flatMap(ident -> new getMedldataCommand(webClient, ident, + .flatMap(ident -> new MedlGetCommand(webClient, ident, token.getTokenValue()).call())); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/getMedldataCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/MedlGetCommand.java similarity index 94% rename from apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/getMedldataCommand.java rename to apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/MedlGetCommand.java index 72b3b50633c..0e695f734fc 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/getMedldataCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/medl/command/MedlGetCommand.java @@ -17,7 +17,7 @@ @Slf4j @RequiredArgsConstructor -public class getMedldataCommand implements Callable> { +public class MedlGetCommand implements Callable> { private static final String MEDL_URL = "/rest/v1/person/{ident}"; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tagshendelseslager/command/TagsHenteCommand.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tagshendelseslager/command/TagsHenteCommand.java index 27f1ac3724b..d000a6338e7 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tagshendelseslager/command/TagsHenteCommand.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tagshendelseslager/command/TagsHenteCommand.java @@ -21,7 +21,7 @@ public class TagsHenteCommand implements Callable> { private static final String PDL_TAGS_URL = "/api/v1/bestilling/tags"; private static final String PDL_TESTDATA = "/pdl-testdata"; - private static final String IDENT = "Nav-Personident"; + private static final String PERSONIDENT = "Nav-Personident"; private final WebClient webClient; private final String ident; @@ -37,7 +37,7 @@ public Mono call() { .build()) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .header(UserConstant.USER_HEADER_JWT, getUserJwt()) - .header(IDENT, ident) + .header(PERSONIDENT, ident) .retrieve() .bodyToMono(JsonNode.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/AsyncConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/AsyncConfig.java index deaa90d3059..19612b1c5ca 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/config/AsyncConfig.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/AsyncConfig.java @@ -1,7 +1,7 @@ package no.nav.dolly.config; import org.springframework.context.annotation.Configuration; -import org.springframework.scheduling.annotation.AsyncConfigurerSupport; +import org.springframework.scheduling.annotation.AsyncConfigurer; import org.springframework.scheduling.annotation.EnableAsync; import org.springframework.security.concurrent.DelegatingSecurityContextExecutorService; @@ -10,7 +10,7 @@ @Configuration @EnableAsync -public class AsyncConfig extends AsyncConfigurerSupport { +public class AsyncConfig implements AsyncConfigurer { private static final int NUMBER_OF_FIXED_THREAD_POOLS = 4; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java index 5b1c3ef128d..c966b5f51b8 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java @@ -19,6 +19,9 @@ @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @RequiredArgsConstructor public class LocalConfig extends AbstractVaultConfiguration { + + private static final String TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -27,12 +30,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); + var token = System.getProperty(TOKEN); if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + throw new IllegalArgumentException(String.format("Påkrevd property '%s' er ikke satt.", TOKEN)); } - return new TokenAuthentication (System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(TOKEN)); } } \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/consumer/kodeverk/Kor2024NyeKommuner.java b/apps/dolly-backend/src/main/java/no/nav/dolly/consumer/kodeverk/Kor2024NyeKommuner.java index e20bc69fb75..fcb30ee4fe9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/consumer/kodeverk/Kor2024NyeKommuner.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/consumer/kodeverk/Kor2024NyeKommuner.java @@ -8,7 +8,7 @@ @UtilityClass public class Kor2024NyeKommuner { - private static Set KOMMUNER = new HashSet<>(); + private static final Set KOMMUNER = new HashSet<>(); static { KOMMUNER.add("1508"); // Ålesund diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java index cd06981c55d..b0c00e36c6e 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsAnsettelsesPeriode.java @@ -18,7 +18,7 @@ public class RsAnsettelsesPeriode { @Schema(description = "Dato fra-og-med", type = "LocalDateTime", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime fom; @Schema(description = "Dato til-og-med", diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java index b096d2f3fff..bc044d81167 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsArbeidsavtale.java @@ -20,7 +20,7 @@ public class RsArbeidsavtale { @Schema(description = "Gyldige verdier finnes i kodeverk 'Arbeidstidsordninger'", type = "String", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String arbeidstidsordning; private Double avtaltArbeidstimerPerUke; @@ -36,7 +36,7 @@ public class RsArbeidsavtale { @Schema(description = "Gyldige verdier finnes i kodeverk 'Yrker'", type = "String", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String yrke; @Schema(description = "Gyldige verdier finnes i kodeverk 'AnsettelsesformAaareg'", diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsOrganisasjon.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsOrganisasjon.java index 6223357753d..8d511e46faf 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsOrganisasjon.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsOrganisasjon.java @@ -15,7 +15,7 @@ public class RsOrganisasjon extends RsAktoer { @Schema(description = "Organisasjonsnummer, må finnes i EREG", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String orgnummer; @Override diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java index 4e2f271e3fc..6351caa4d64 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAareg.java @@ -18,7 +18,7 @@ public class RsPeriodeAareg { @Schema(description = "Dato fra-og-med", type = "LocalDateTime", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime fom; @Schema(description = "Dato til-og-med", diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java index 033bf4e985a..26f3381e334 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPeriodeAmelding.java @@ -22,7 +22,7 @@ public class RsPeriodeAmelding { @Schema(description = "Dato fra-og-med", type = "LocalDateTime", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private LocalDateTime fom; @Schema(description = "Dato til-og-med", diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPermisjon.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPermisjon.java index 23b99b4d0e0..af4dec32195 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPermisjon.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsPermisjon.java @@ -23,7 +23,7 @@ public class RsPermisjon { private BigDecimal permisjonsprosent; @Schema(description = "Gyldige verdier finnes i kodeverk 'PermisjonsOgPermitteringsBeskrivelse'", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String permisjon; private String permisjonOgPermittering; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsUtenlandsopphold.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsUtenlandsopphold.java index 11cb5892616..3b2189c4fa5 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsUtenlandsopphold.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/RsUtenlandsopphold.java @@ -18,6 +18,6 @@ public class RsUtenlandsopphold { private RsPeriodeAareg periode; @Schema(description = "Gyldige verdier finnes i kodeverk 'LandkoderISO2'", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String land; } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateSerializer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateSerializer.java deleted file mode 100644 index 69b67b90ec9..00000000000 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateSerializer.java +++ /dev/null @@ -1,20 +0,0 @@ -package no.nav.dolly.domain.resultset.aareg.util; - -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; - -import java.io.IOException; -import java.time.LocalDateTime; -import java.time.format.DateTimeFormatter; - -public class JsonDateSerializer extends JsonSerializer { - - private final DateTimeFormatter formatter = DateTimeFormatter.ISO_DATE_TIME; - - @Override - public void serialize(LocalDateTime date, JsonGenerator generator, SerializerProvider arg2) throws IOException { - final String dateString = date.format(this.formatter); - generator.writeString(dateString); - } -} diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/ArenaNyBruker.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/ArenaNyBruker.java index 78b275de9f1..7a0e8b8aca1 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/ArenaNyBruker.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/arenaforvalter/ArenaNyBruker.java @@ -37,5 +37,5 @@ public boolean hasKvalifiseringsgruppe() { @JsonIgnore public boolean hasServicebehov() { return isNull(utenServicebehov); - }; + } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java index f6c9e7d157e..69070a66ddb 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/breg/RsBregdata.java @@ -1,18 +1,18 @@ package no.nav.dolly.domain.resultset.breg; -import static java.util.Objects.isNull; - -import java.time.LocalDateTime; -import java.util.ArrayList; -import java.util.List; import com.fasterxml.jackson.annotation.JsonInclude; - import io.swagger.v3.oas.annotations.media.Schema; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.Setter; +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.List; + +import static java.util.Objects.isNull; + @Getter @Setter @NoArgsConstructor @@ -20,10 +20,7 @@ @JsonInclude(JsonInclude.Include.NON_NULL) public class RsBregdata { - public enum Egenskap {Deltager, Komplementar, Kontaktperson, Sameier, Styre} - private List enheter; - private List understatuser; public List getEnheter() { @@ -40,6 +37,8 @@ public List getUnderstatuser() { return understatuser; } + public enum Egenskap {DELTAGER, KOMPLEMENTAR, KONTAKTPERSON, SAMEIER, STYRE} + @Getter @Setter @NoArgsConstructor diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/dokarkiv/RsDokarkiv.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/dokarkiv/RsDokarkiv.java index ee478d11864..19e20f086ca 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/dokarkiv/RsDokarkiv.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/dokarkiv/RsDokarkiv.java @@ -11,7 +11,6 @@ import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import static java.util.Objects.isNull; @@ -22,45 +21,26 @@ @JsonInclude(JsonInclude.Include.NON_EMPTY) public class RsDokarkiv { - public enum JournalPostType { - - INNGAAENDE, UTGAAENDE, NOTAT - } - - public enum IdType { - - FNR, ORGNR, HPRNR, UTL_ORG - } - @Schema(description = "Tittel som beskriver forsendelsen samlet, feks \"Søknad om dagpenger ved permittering\"") private String tittel; - private JournalPostType journalpostType; - @Schema(description = "Temaet som forsendelsen tilhører, for eksempel “DAG” (Dagpenger)") private String tema; - @Schema(description = "Behandlingstema for forsendelsen, for eksempel ab0001 (Ordinære dagpenger).") private String behandlingstema; - @Schema(description = "Kanalen som ble brukt ved innsending eller distribusjon. F.eks. NAV_NO, ALTINN eller EESSI.") private String kanal; - @Schema(description = "NAV-enheten som har journalført, eventuelt skal journalføre, forsendelsen. " + "Ved automatisk journalføring uten mennesker involvert skal enhet settes til \"9999\".\n" + "Konsument må sette journalfoerendeEnhet dersom tjenesten skal ferdigstille journalføringen.") private String journalfoerendeEnhet; - @Schema(description = "AvsenderMottaker") private AvsenderMottaker avsenderMottaker; - @Schema(description = "Første dokument blir tilknyttet som hoveddokument på journalposten. " + "Øvrige dokumenter tilknyttes som vedlegg. Rekkefølgen på vedlegg beholdes ikke ved uthenting av journalpost.") private List dokumenter; - @Schema(description = "Forsøker å ferdigstille dokument etter innsending") private Boolean ferdigstill; - @Schema(description = "Saken i PSAK eller GSAK som dokumentene skal journalføres mot.") private Sak sak; @@ -71,6 +51,16 @@ public List getDokumenter() { return dokumenter; } + public enum JournalPostType { + + INNGAAENDE, UTGAAENDE, NOTAT + } + + public enum IdType { + + FNR, ORGNR, HPRNR, UTL_ORG + } + @Builder @NoArgsConstructor @AllArgsConstructor @@ -91,6 +81,7 @@ public static class AvsenderMottaker { "Navn på personbrukere skal lagres på formatet etternavn, fornavn mellomnavn") private String navn; } + @Getter @Setter @Builder @@ -99,13 +90,15 @@ public static class AvsenderMottaker { @JsonInclude(JsonInclude.Include.NON_EMPTY) public static class Dokument { - @Schema(description = "Dokumentets tittel, f.eks. \"Søknad om dagpenger ved permittering\".\n" + - "Dokumentets tittel blir synlig i brukers journal på nav.no, samt i Gosys.") + @Schema(description = """ + Dokumentets tittel, f.eks. "Søknad om dagpenger ved permittering". + Dokumentets tittel blir synlig i brukers journal på nav.no, samt i Gosys.""") private String tittel; - @Schema(description = "Typen dokument. Brevkoden sier noe om dokumentets innhold og oppbygning.\n" + - "For inngående dokumenter kan brevkoden være en NAV-skjemaID f.eks. “NAV 04-01.04” eller en SED-id.\n" + - "Brevkode skal ikke settes for ustrukturert, uklassifisert dokumentasjon, f.eks. brukeropplastede vedlegg.") + @Schema(description = """ + Typen dokument. Brevkoden sier noe om dokumentets innhold og oppbygning. + "For inngående dokumenter kan brevkoden være en NAV-skjemaID f.eks. “NAV 04-01.04” eller en SED-id. + "Brevkode skal ikke settes for ustrukturert, uklassifisert dokumentasjon, f.eks. brukeropplastede vedlegg.""") private String brevkode; @Schema(description = "DokumentVariant") @@ -123,7 +116,8 @@ public String toString() { return String.format("Dokument{tittel='%s', brevkode='%s', dokumentvariantListe=%s}", tittel, brevkode, - dokumentvarianter.stream().map(DokumentVariant::toString).collect(Collectors.toList())); + dokumentvarianter.stream().map(DokumentVariant::toString) + .toList()); } @Data @@ -139,11 +133,12 @@ public static class DokumentVariant { @Schema(description = "Selve dokumentet. Hvis filtype er PDF/XML, ved fysisk dokument brukes bytearray.") private String fysiskDokument; - @Schema(description = "ARKIV brukes for dokumentvarianter i menneskelesbart format (for eksempel PDFA). " - + "Gosys og nav.no henter arkivvariant og viser denne til bruker.\n" - + "ORIGINAL skal brukes for dokumentvariant i maskinlesbart format " - + "(for eksempel XML og JSON) som brukes for automatisk saksbehandling\n" - + "Alle dokumenter må ha én variant med variantFormat ARKIV.") + @Schema(description = """ + ARKIV brukes for dokumentvarianter i menneskelesbart format (for eksempel PDFA). + Gosys og nav.no henter arkivvariant og viser denne til bruker. + ORIGINAL skal brukes for dokumentvariant i maskinlesbart format + (for eksempel XML og JSON) som brukes for automatisk saksbehandling + Alle dokumenter må ha én variant med variantFormat ARKIV.""") private String variantformat; @Override diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java index 1a17feb1ae5..32c5cc30196 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/inntektstub/RsInntektsinformasjon.java @@ -30,15 +30,15 @@ public class RsInntektsinformasjon { @Schema(description = "Siste år-måned for gjeldene inntektsinformasjon", example = "yyyy-MM", type = "String", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String sisteAarMaaned; @Schema(description = "Organisasjonsnummer/norskIdent", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String opplysningspliktig; @Schema(description = "Organisasjonsnummer/norskIdent", - required = true) + requiredMode = Schema.RequiredMode.REQUIRED) private String virksomhet; private List inntektsliste; diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/util/JsonZonedDateTimeDeserializer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/util/JsonZonedDateTimeDeserializer.java deleted file mode 100644 index e69de29bb2d..00000000000 diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingInntektsmeldingStatusMapper.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingInntektsmeldingStatusMapper.java index b934c70a282..27ccec4de65 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingInntektsmeldingStatusMapper.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingInntektsmeldingStatusMapper.java @@ -10,7 +10,6 @@ import java.util.List; import java.util.Map; import java.util.Set; -import java.util.stream.Collectors; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; @@ -48,9 +47,9 @@ public static List buildInntektsmeldingStatusMap(List(envIdent.getValue())) .build()) - .collect(Collectors.toList())) + .toList()) .build()) - .collect(Collectors.toList())) + .toList()) .build()); } } \ No newline at end of file diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingOrganisasjonStatusMapper.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingOrganisasjonStatusMapper.java index adf1441df99..7a672c3f6e0 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingOrganisasjonStatusMapper.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/BestillingOrganisasjonStatusMapper.java @@ -10,7 +10,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; import static java.util.Collections.emptyList; import static java.util.Collections.singletonList; @@ -55,19 +54,20 @@ public static List buildOrganisasjonStatusMap(Organ .map(entry -> RsOrganisasjonStatusRapport.Status.builder() .melding(entry.getKey()) .detaljert(entry.getValue().stream().map(value -> RsOrganisasjonStatusRapport.Detaljert.builder() - .miljo(value) - .orgnummer(progress.getOrganisasjonsnummer()) - .detaljertStatus(getOrgStatusDetailForMiljo(orgStatuser, value)) - .build()).collect(Collectors.toList())) + .miljo(value) + .orgnummer(progress.getOrganisasjonsnummer()) + .detaljertStatus(getOrgStatusDetailForMiljo(orgStatuser, value)) + .build()) + .toList()) .build()) - .collect(Collectors.toList())) + .toList()) .build()); } private static String getOrgStatusDetailForMiljo(List orgStatuser, String miljo) { return orgStatuser.stream() - .filter( orgStatus -> orgStatus.getEnvironment().equals(miljo)) - .findFirst().orElseGet(() -> new OrganisasjonDeployStatus.OrgStatus()) + .filter(orgStatus -> orgStatus.getEnvironment().equals(miljo)) + .findFirst().orElseGet(OrganisasjonDeployStatus.OrgStatus::new) .getDetails(); } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategy.java index fe22358534a..cb68e061add 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategy.java @@ -10,7 +10,6 @@ import org.springframework.stereotype.Component; import static java.util.Objects.nonNull; -import static java.util.stream.Collectors.toList; @Component public class BrukerMappingStrategy implements MappingStrategy { @@ -23,7 +22,9 @@ public void register(MapperFactory factory) { public void mapAtoB(Bruker bruker, RsBrukerAndGruppeId rsBruker, MappingContext context) { if (!bruker.getFavoritter().isEmpty()) { - rsBruker.setFavoritter(bruker.getFavoritter().stream().map(gruppe -> gruppe.getId().toString()).collect(toList())); + rsBruker.setFavoritter(bruker.getFavoritter().stream() + .map(gruppe -> gruppe.getId().toString()) + .toList()); } } }) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/service/InntektsmeldingEnumService.java b/apps/dolly-backend/src/main/java/no/nav/dolly/service/InntektsmeldingEnumService.java index 99522038e1a..449f6a56950 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/service/InntektsmeldingEnumService.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/service/InntektsmeldingEnumService.java @@ -8,14 +8,36 @@ import no.nav.dolly.domain.resultset.inntektsmeldingstub.YtelseType; import org.springframework.stereotype.Service; -import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.Stream; @Service public class InntektsmeldingEnumService { + public List getEnumType(EnumTypes enumType) { + + return switch (enumType) { + case AARSAK_TIL_INNSENDING_TYPE -> Stream.of(AarsakTilInnsendingType.values()) + .map(Enum::name) + .toList(); + case AARSAK_TIL_UTSETTELSE_TYPE -> Stream.of(AarsakTilUtsettelseType.values()) + .map(Enum::name) + .toList(); + case AARSAK_VED_ENDRING_TYPE -> Stream.of(AarsakVedEndringType.values()) + .map(Enum::name) + .toList(); + case BEGRUNNELSE_TYPE -> Stream.of(BegrunnelseForReduksjonEllerIkkeUtbetaltType.values()) + .map(Enum::name) + .toList(); + case NATURALYTELSE_TYPE -> Stream.of(NaturalytelseType.values()) + .map(Enum::name) + .toList(); + case YTELSE_TYPE -> Stream.of(YtelseType.values()) + .map(Enum::name) + .toList(); + }; + } + public enum EnumTypes { AARSAK_TIL_INNSENDING_TYPE, @@ -25,17 +47,4 @@ public enum EnumTypes { NATURALYTELSE_TYPE, YTELSE_TYPE } - - public List getEnumType(EnumTypes enumType) { - - return switch (enumType) { - case AARSAK_TIL_INNSENDING_TYPE -> Stream.of(AarsakTilInnsendingType.values()).map(Enum::name).collect(Collectors.toList()); - case AARSAK_TIL_UTSETTELSE_TYPE -> Stream.of(AarsakTilUtsettelseType.values()).map(Enum::name).collect(Collectors.toList()); - case AARSAK_VED_ENDRING_TYPE -> Stream.of(AarsakVedEndringType.values()).map(Enum::name).collect(Collectors.toList()); - case BEGRUNNELSE_TYPE -> Stream.of(BegrunnelseForReduksjonEllerIkkeUtbetaltType.values()).map(Enum::name).collect(Collectors.toList()); - case NATURALYTELSE_TYPE -> Stream.of(NaturalytelseType.values()).map(Enum::name).collect(Collectors.toList()); - case YTELSE_TYPE -> Stream.of(YtelseType.values()).map(Enum::name).collect(Collectors.toList()); - default -> Collections.emptyList(); - }; - } } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/service/excel/ExcelUtil.java b/apps/dolly-backend/src/main/java/no/nav/dolly/service/excel/ExcelUtil.java index 9801c64c399..6c64ebd6da4 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/service/excel/ExcelUtil.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/service/excel/ExcelUtil.java @@ -24,15 +24,15 @@ public class ExcelUtil { public static final String PERSON_FANE = "Personer"; public static final String BANKKONTO_FANE = "Bankkontoer"; - public static final Object[] BANKKONTO_HEADER = {"Ident", "Kontonummer (Norge)", "Kontonummer (Utland)", "Banknavn", "Bankkode", - "Banklandkode", "Valutakode", "Swift/Bickode", "Bankadresse1", "Bankadresse2", "Bankadresse3"}; - public static final Integer[] BANKKONTO_COL_WIDTHS = {14, 20, 20, 20, 20, 20, 20, 20, 30, 30, 30}; + static final Object[] BANKKONTO_HEADER = { "Ident", "Kontonummer (Norge)", "Kontonummer (Utland)", "Banknavn", "Bankkode", + "Banklandkode", "Valutakode", "Swift/Bickode", "Bankadresse1", "Bankadresse2", "Bankadresse3" }; + static final Integer[] BANKKONTO_COL_WIDTHS = { 14, 20, 20, 20, 20, 20, 20, 20, 30, 30, 30 }; public static void appendHyperlinkRelasjon(XSSFWorkbook workbook, - String fane, - List verdier, - int indekskolonne, - int kolonne) { + String fane, + List verdier, + int indekskolonne, + int kolonne) { var hyperLinks = createLinkReferanser(verdier, indekskolonne); IntStream.range(0, verdier.size()).boxed() diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/util/CurrentAuthentication.java b/apps/dolly-backend/src/main/java/no/nav/dolly/util/CurrentAuthentication.java index 2df668d15c7..3b0b9927831 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/util/CurrentAuthentication.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/util/CurrentAuthentication.java @@ -45,7 +45,7 @@ public static String azureUserId() { private static JwtAuthenticationToken getToken() { return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication()) - .filter(o -> o instanceof JwtAuthenticationToken) + .filter(JwtAuthenticationToken.class::isInstance) .map(JwtAuthenticationToken.class::cast) .orElseThrow(() -> new RuntimeException("Finner ikke Jwt Authentication Token")); } diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/consumer/kodeverk/KodeverkMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/consumer/kodeverk/KodeverkMapperTest.java index c42b64e8714..d0701c22c9c 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/consumer/kodeverk/KodeverkMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/consumer/kodeverk/KodeverkMapperTest.java @@ -20,7 +20,7 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.hasProperty; -public class KodeverkMapperTest { +class KodeverkMapperTest { private static final String STANDARD_KODE = "1234"; private static final String STANDARD_KODE_2 = "5678"; @@ -45,7 +45,7 @@ public void setup() { } @Test - public void mapBetydningToAdjustedKodeverk_gjorOmKodeverkBetydningerTilKodeverkAdjustedMedValueOgLabel() { + void mapBetydningToAdjustedKodeverk_gjorOmKodeverkBetydningerTilKodeverkAdjustedMedValueOgLabel() { Beskrivelse beskrivelse2 = Beskrivelse.builder().tekst("tekst").term(STANDARD_TERM_2).build(); Map beskrivelser2 = new HashMap<>(); beskrivelser2.put(KODE_BOKMAAL, beskrivelse2); @@ -54,10 +54,10 @@ public void mapBetydningToAdjustedKodeverk_gjorOmKodeverkBetydningerTilKodeverkA betydninger.put(STANDARD_KODE_2, List.of(betydning2)); var kodeverk = kodeverkMapper.mapBetydningToAdjustedKodeverk("navn", - Flux.just(KodeverkBetydningerResponse.builder() - .betydninger(betydninger) - .build())) - .blockFirst(); + Flux.just(KodeverkBetydningerResponse.builder() + .betydninger(betydninger) + .build())) + .blockFirst(); assertThat(kodeverk.getKoder(), hasItem(allOf( hasProperty("value", equalTo(STANDARD_KODE)), @@ -77,23 +77,23 @@ public void mapBetydningToAdjustedKodeverk_gjorOmKodeverkBetydningerTilKodeverkA } @Test - public void mapBetydningToAdjustedKodeverk_tomListeAvBetydningerGirKodeverkadjustedMedTomListeAvKoder() { + void mapBetydningToAdjustedKodeverk_tomListeAvBetydningerGirKodeverkadjustedMedTomListeAvKoder() { var kodeverk = kodeverkMapper.mapBetydningToAdjustedKodeverk(STANDARD_KODEVERK_NAVN, - Flux.just(KodeverkBetydningerResponse.builder() - .betydninger(new HashMap<>()) - .build())) - .blockFirst(); + Flux.just(KodeverkBetydningerResponse.builder() + .betydninger(new HashMap<>()) + .build())) + .blockFirst(); assertThat(kodeverk.getKoder().isEmpty(), is(true)); assertThat(kodeverk.getName(), is(STANDARD_KODEVERK_NAVN)); } @Test - public void mapBetydningToAdjustedKodeverk_nullVerdiForBetydningerGirKodeverkadjustedMedTomListeAvKoder() { + void mapBetydningToAdjustedKodeverk_nullVerdiForBetydningerGirKodeverkadjustedMedTomListeAvKoder() { var kodeverk = kodeverkMapper.mapBetydningToAdjustedKodeverk(STANDARD_KODEVERK_NAVN, Flux.empty()) - .blockFirst(); + .blockFirst(); Assertions.assertNull(kodeverk); } diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/domain/resultset/IdentTypeUtilTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/domain/resultset/IdentTypeUtilTest.java index 07a0d5c23bd..21c94235b82 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/domain/resultset/IdentTypeUtilTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/domain/resultset/IdentTypeUtilTest.java @@ -10,26 +10,26 @@ import static org.hamcrest.Matchers.equalTo; @ExtendWith(MockitoExtension.class) -public class IdentTypeUtilTest { +class IdentTypeUtilTest { private static final String FNR_IDENT = "10101020312"; private static final String DNR_IDENT = "40101020312"; private static final String NPID_IDENT = "10301020312"; @Test - public void getIdentTypeFNR_OK() { + void getIdentTypeFNR_OK() { assertThat(IdentTypeUtil.getIdentType(FNR_IDENT), is(equalTo(IdentType.FNR))); } @Test - public void getIdentTypeDNR_OK() { + void getIdentTypeDNR_OK() { assertThat(IdentTypeUtil.getIdentType(DNR_IDENT), is(equalTo(IdentType.DNR))); } @Test - public void getIdentTypeBOST_OK() { + void getIdentTypeBOST_OK() { assertThat(IdentTypeUtil.getIdentType(NPID_IDENT), is(equalTo(IdentType.NPID))); } diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingAaregStatusMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingAaregStatusMapperTest.java index ed72fd34094..463659b5f23 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingAaregStatusMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingAaregStatusMapperTest.java @@ -12,12 +12,12 @@ import static org.hamcrest.Matchers.equalTo; import static org.hamcrest.Matchers.is; -public class BestillingAaregStatusMapperTest { +class BestillingAaregStatusMapperTest { private static final String IDENT = "111111111"; @Test - public void buildAaregStatusMap() { + void buildAaregStatusMap() { BestillingProgress progress = BestillingProgress.builder() .aaregStatus("t0: arbforhold=1$Feil& OpprettArbeidsforholdSikkerhetsbegrensning -> Bruker har ikke rettighet til å opprette denne personen.," + "t6: arbforhold=1$OK," @@ -40,7 +40,7 @@ public void buildAaregStatusMap() { } @Test - public void buildAaregBAFeilmeldingStatusMap() { + void buildAaregBAFeilmeldingStatusMap() { BestillingProgress progress = BestillingProgress.builder() .aaregStatus("t0: arbforhold=1$Feil= BA40 UgyldigPersonnummerException 123456789," + "t6: arbforhold=1$OK," diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingArenaforvalterStatusMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingArenaforvalterStatusMapperTest.java index 6c95e02a34b..51468f59e12 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingArenaforvalterStatusMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingArenaforvalterStatusMapperTest.java @@ -14,7 +14,7 @@ import static org.hamcrest.Matchers.containsInAnyOrder; @ExtendWith(MockitoExtension.class) -public class BestillingArenaforvalterStatusMapperTest { +class BestillingArenaforvalterStatusMapperTest { private static final List RUN_STATUS = List.of( BestillingProgress.builder().ident("IDENT_1") @@ -23,7 +23,7 @@ public class BestillingArenaforvalterStatusMapperTest { ); @Test - public void buildArenaForvalterStatusMap_OK() { + void buildArenaForvalterStatusMap_OK() { List identStatuses = BestillingArenaforvalterStatusMapper.buildArenaStatusMap(RUN_STATUS); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingKrrStubStatusMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingKrrStubStatusMapperTest.java index 02cb537f47d..85df568491c 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingKrrStubStatusMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingKrrStubStatusMapperTest.java @@ -15,7 +15,7 @@ import static org.hamcrest.Matchers.equalTo; @ExtendWith(MockitoExtension.class) -public class BestillingKrrStubStatusMapperTest { +class BestillingKrrStubStatusMapperTest { private static final List RUN_STATUS = asList( BestillingProgress.builder().ident("IDENT_1") @@ -36,7 +36,7 @@ public class BestillingKrrStubStatusMapperTest { ); @Test - public void krrStubStatusMap() { + void krrStubStatusMap() { List identStatuses = BestillingKrrStubStatusMapper.buildKrrStubStatusMap(RUN_STATUS); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingSigrunStubStatusMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingSigrunStubStatusMapperTest.java index 10ab2c6b57a..0a6587e5c1f 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingSigrunStubStatusMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingSigrunStubStatusMapperTest.java @@ -15,7 +15,7 @@ import static org.hamcrest.Matchers.equalTo; @ExtendWith(MockitoExtension.class) -public class BestillingSigrunStubStatusMapperTest { +class BestillingSigrunStubStatusMapperTest { private static final List RUN_STATUS = asList( BestillingProgress.builder().ident("IDENT_1") @@ -36,7 +36,7 @@ public class BestillingSigrunStubStatusMapperTest { ); @Test - public void sigrunStubStatusMap() { + void sigrunStubStatusMap() { List identStatuses = BestillingSigrunStubStatusMapper.buildSigrunStubStatusMap(RUN_STATUS); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStatusMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStatusMapperTest.java index 7a9373f5e82..61e615bb69f 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStatusMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStatusMapperTest.java @@ -14,7 +14,7 @@ import static org.hamcrest.Matchers.is; @ExtendWith(MockitoExtension.class) -public class BestillingUdiStatusMapperTest { +class BestillingUdiStatusMapperTest { private static final List ERROR_STATUS = List.of( BestillingProgress.builder().ident("IDENT_1") @@ -35,7 +35,7 @@ public class BestillingUdiStatusMapperTest { ); @Test - public void udiStatusMapper_MapFeilmeldinger() { + void udiStatusMapper_MapFeilmeldinger() { List statusRapport = BestillingUdiStubStatusMapper.buildUdiStubStatusMap(ERROR_STATUS); assertThat(statusRapport.get(0).getStatuser().get(0).getMelding(), is(equalTo("FEIL: Gjenopprett feilet for udistubclient: 500 Internal Server Error"))); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStubStatusMapperTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStubStatusMapperTest.java index fc042acdda6..7de3e3899b8 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStubStatusMapperTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/BestillingUdiStubStatusMapperTest.java @@ -14,14 +14,14 @@ import static org.hamcrest.Matchers.is; @ExtendWith(MockitoExtension.class) -public class BestillingUdiStubStatusMapperTest { +class BestillingUdiStubStatusMapperTest { private static final String IDENT1 = "11111111111"; private static final String IDENT2 = "22222222222"; private static final String ERROR_STATUS = "FEIL: something fishy: is going on"; @Test - public void buildUdiStubStatusMap() { + void buildUdiStubStatusMap() { List result = BestillingUdiStubStatusMapper.buildUdiStubStatusMap(List.of(BestillingProgress.builder() .ident(IDENT1) diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/ArenaMappingStrategyTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/ArenaMappingStrategyTest.java index f89f99255ee..901c2e205ae 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/ArenaMappingStrategyTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/ArenaMappingStrategyTest.java @@ -26,7 +26,7 @@ import static org.hamcrest.MatcherAssert.assertThat; @ExtendWith(MockitoExtension.class) -public class ArenaMappingStrategyTest { +class ArenaMappingStrategyTest { private static final LocalDateTime TIME_NOW = LocalDateTime.now(); private static final LocalDateTime OLD_TIMES = LocalDateTime.of(2018, 1, 1, 0, 0); @@ -40,7 +40,7 @@ public void setup() { } @Test - public void arenaBrukerUtenServicebehovMedDato() { + void arenaBrukerUtenServicebehovMedDato() { ArenaNyBruker arenaNyBruker = mapperFacade.map(Arenadata.builder() .arenaBrukertype(UTEN_SERVICEBEHOV) @@ -52,7 +52,7 @@ public void arenaBrukerUtenServicebehovMedDato() { } @Test - public void arenaBrukerUtenServicebehovUtenDato() { + void arenaBrukerUtenServicebehovUtenDato() { ArenaNyBruker arenaNyBruker = mapperFacade.map(Arenadata.builder() .arenaBrukertype(UTEN_SERVICEBEHOV) @@ -63,7 +63,7 @@ public void arenaBrukerUtenServicebehovUtenDato() { } @Test - public void arenaBrukerMedServicebehovVarig() { + void arenaBrukerMedServicebehovVarig() { ArenaNyBruker arenaNyBruker = mapperFacade.map(Arenadata.builder() .arenaBrukertype(MED_SERVICEBEHOV) @@ -76,7 +76,7 @@ public void arenaBrukerMedServicebehovVarig() { } @Test - public void arenaBrukerMedAap() { + void arenaBrukerMedAap() { ArenaNyBruker arenaNyBruker = mapperFacade.map(Arenadata.builder() .arenaBrukertype(MED_SERVICEBEHOV) diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategyTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategyTest.java index 6deb160859a..3bf2f4947bc 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategyTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/BrukerMappingStrategyTest.java @@ -16,7 +16,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -public class BrukerMappingStrategyTest { +class BrukerMappingStrategyTest { private MapperFacade mapper; @@ -26,7 +26,7 @@ public void setUpHappyPath() { } @Test - public void mapBruker() { + void mapBruker() { Bruker bruker = Bruker.builder().brukerId("ident") .favoritter(new HashSet<>(singletonList(Testgruppe.builder() diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/TestidentMappingTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/TestidentMappingTest.java index b639d8b09b4..50927b6d33a 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/TestidentMappingTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/mapper/strategy/TestidentMappingTest.java @@ -16,7 +16,7 @@ import static org.hamcrest.CoreMatchers.is; import static org.hamcrest.MatcherAssert.assertThat; -public class TestidentMappingTest { +class TestidentMappingTest { private MapperFacade mapper; @@ -26,7 +26,7 @@ public void setUpHappyPath() { } @Test - public void mapToRsTestidentIncludingTestgruppe() { + void mapToRsTestidentIncludingTestgruppe() { Bruker bruker = Bruker.builder().navIdent("ident").build(); Testgruppe testgruppe = Testgruppe.builder() diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BestillingControllerTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BestillingControllerTest.java index 8e23ac4ed2a..ea7b9a628f6 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BestillingControllerTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BestillingControllerTest.java @@ -23,7 +23,7 @@ import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -public class BestillingControllerTest { +class BestillingControllerTest { private static final Long BESTILLING_ID = 1L; private static final Long GRUPPE_ID = 111L; @@ -44,7 +44,7 @@ public class BestillingControllerTest { private BestillingController bestillingController; @Test - public void getBestillingById_oppdatererMedPersonstatusOrReturnererBestilling() { + void getBestillingById_oppdatererMedPersonstatusOrReturnererBestilling() { RsBestillingStatus bestillingStatus = RsBestillingStatus.builder().build(); when(bestillingService.fetchBestillingById(any())).thenReturn(new Bestilling()); @@ -56,7 +56,7 @@ public void getBestillingById_oppdatererMedPersonstatusOrReturnererBestilling() } @Test - public void getBestillingerOk() { + void getBestillingerOk() { when(mapperFacade.mapAsList(anyList(), eq(RsBestillingStatus.class))) .thenReturn(singletonList(RsBestillingStatus.builder().id(BESTILLING_ID).build())); @@ -69,7 +69,7 @@ public void getBestillingerOk() { } @Test - public void stopBestillingProgressOk() { + void stopBestillingProgressOk() { when(bestillingService.cancelBestilling(BESTILLING_ID)).thenReturn(Bestilling.builder().build()); bestillingController.stopBestillingProgress(BESTILLING_ID, null); @@ -78,7 +78,7 @@ public void stopBestillingProgressOk() { } @Test - public void malBestillingNavnOk() { + void malBestillingNavnOk() { bestillingController.getMalBestillinger(null); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BrukerControllerTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BrukerControllerTest.java index dede8d37a50..fe08d48f942 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BrukerControllerTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/BrukerControllerTest.java @@ -24,7 +24,7 @@ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) -public class BrukerControllerTest { +class BrukerControllerTest { private final static String BRUKERID = "123"; private final static String BRUKERNAVN = "BRUKER"; @@ -39,8 +39,13 @@ public class BrukerControllerTest { @InjectMocks private BrukerController controller; + @BeforeEach + public void setup() { + MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); + } + @Test - public void getBrukerByBrukerId() { + void getBrukerByBrukerId() { RsBrukerAndGruppeId bruker = RsBrukerAndGruppeId.builder().brukerId("brukerId").build(); Bruker b = Bruker.builder().build(); @@ -53,7 +58,7 @@ public void getBrukerByBrukerId() { } @Test - public void getCurrentBruker() { + void getCurrentBruker() { Bruker bruker = Bruker.builder().build(); RsBruker rsBruker = new RsBruker(); @@ -65,13 +70,13 @@ public void getCurrentBruker() { } @Test - public void getAllBrukere() { + void getAllBrukere() { controller.getAllBrukere(); verify(brukerService).fetchBrukere(); } @Test - public void fjernFavoritter() { + void fjernFavoritter() { RsBrukerUpdateFavoritterReq req = new RsBrukerUpdateFavoritterReq(); req.setGruppeId(1l); controller.fjernFavoritt(req); @@ -79,15 +84,10 @@ public void fjernFavoritter() { } @Test - public void leggTilFavoritter() { + void leggTilFavoritter() { RsBrukerUpdateFavoritterReq req = new RsBrukerUpdateFavoritterReq(); req.setGruppeId(1l); controller.leggTilFavoritt(req); verify(brukerService).leggTilFavoritt(anyLong()); } - - @BeforeEach - public void setup() { - MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); - } } \ No newline at end of file diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/OppslagControllerTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/OppslagControllerTest.java index 05486a01e0b..7737417d444 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/OppslagControllerTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/provider/api/OppslagControllerTest.java @@ -3,7 +3,6 @@ import no.nav.dolly.consumer.kodeverk.KodeverkConsumer; import no.nav.dolly.consumer.kodeverk.KodeverkMapper; import no.nav.dolly.consumer.kodeverk.domain.KodeverkBetydningerResponse; -import no.nav.dolly.consumer.kodeverk.domain.KodeverkBetydningerResponse.Betydning; import no.nav.dolly.domain.resultset.kodeverk.KodeverkAdjusted; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.extension.ExtendWith; @@ -19,7 +18,7 @@ import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -public class OppslagControllerTest { +class OppslagControllerTest { private static final String STANDARD_KODEVERK_NAME = "name"; @@ -32,9 +31,6 @@ public class OppslagControllerTest { @InjectMocks private OppslagController oppslagController; - @Mock - private Betydning betydning; - @Mock private KodeverkAdjusted kodeverkAdjusted; @@ -42,11 +38,11 @@ public class OppslagControllerTest { private KodeverkBetydningerResponse kodeverkKoderBetydningerResponse; @Test - public void fetchKodeverkByName_happyPath() { + void fetchKodeverkByName_happyPath() { when(kodeverkConsumer.fetchKodeverkByName(STANDARD_KODEVERK_NAME)).thenReturn(Flux.just(kodeverkKoderBetydningerResponse)); - when(kodeverkMapper.mapBetydningToAdjustedKodeverk(eq(STANDARD_KODEVERK_NAME), any(Flux.class))) + when(kodeverkMapper.mapBetydningToAdjustedKodeverk(eq(STANDARD_KODEVERK_NAME), any())) .thenReturn(Flux.just(kodeverkAdjusted)); var kodeverkResponse = oppslagController.fetchKodeverkByName(STANDARD_KODEVERK_NAME); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java index a4349b3ee20..cb0aa929d4a 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java @@ -48,7 +48,7 @@ @EnableAutoConfiguration @ComponentScan("no.nav.dolly") @AutoConfigureMockMvc(addFilters = false) -public class BestillingMalServiceTest { +class BestillingMalServiceTest { private final static String MALNAVN = "test"; private final static String NYTT_MALNAVN = "nyttMalnavn"; diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingProgressServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingProgressServiceTest.java index 321fc2308cf..9813f5cac53 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingProgressServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingProgressServiceTest.java @@ -24,7 +24,7 @@ import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -public class BestillingProgressServiceTest { +class BestillingProgressServiceTest { private final static String BRUKERID = "123"; private final static String BRUKERNAVN = "BRUKER"; @@ -36,15 +36,20 @@ public class BestillingProgressServiceTest { @InjectMocks private BestillingProgressService progressService; + @BeforeTestClass + public void setup() { + MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); + } + @Test - public void bestillingProgressKasterExceptionHvisManIkkeFinnerProgress() throws Exception { + void bestillingProgressKasterExceptionHvisManIkkeFinnerProgress() throws Exception { when(mockRepo.findByBestillingId(any())).thenReturn(Optional.empty()); Assertions.assertThrows(NotFoundException.class, () -> progressService.fetchBestillingProgressByBestillingsIdFromDB(null)); } @Test - public void hviFetchBestillingProgressFinnerObjectSåReturnerObjektet() { + void hviFetchBestillingProgressFinnerObjectSåReturnerObjektet() { BestillingProgress mock = Mockito.mock(BestillingProgress.class); when(mockRepo.findByBestillingId(1l)).thenReturn(Optional.of(Collections.singletonList(mock))); List bes = progressService.fetchBestillingProgressByBestillingsIdFromDB(1l); @@ -52,15 +57,10 @@ public void bestillingProgressKasterExceptionHvisManIkkeFinnerProgress() throws } @Test - public void hvisFetchProgressSomReturnererTomListeHvisIkkeFunnetIkkeFinnerObjektSåReturnerTomListe() { + void hvisFetchProgressSomReturnererTomListeHvisIkkeFunnetIkkeFinnerObjektSåReturnerTomListe() { when(mockRepo.findByBestillingId(1l)).thenReturn(Optional.of(new ArrayList<>())); List bes = progressService.fetchBestillingProgressByBestillingId(1l); assertThat(bes.isEmpty(), is(true)); } - @BeforeTestClass - public void setup() { - MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); - } - } \ No newline at end of file diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BrukerServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BrukerServiceTest.java index b89d9a8f608..0c2bd1c23f2 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BrukerServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BrukerServiceTest.java @@ -38,11 +38,9 @@ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) -public class BrukerServiceTest { +class BrukerServiceTest { private final static String BRUKERID = "123"; - private final static String BRUKERNAVN = "BRUKER"; - private final static String EPOST = "@@@@"; @Mock private BrukerRepository brukerRepository; @@ -53,41 +51,46 @@ public class BrukerServiceTest { @InjectMocks private BrukerService brukerService; + @BeforeEach + public void setup() { + MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); + } + @Test - public void fetchBruker_kasterIkkeExceptionOgReturnererBrukerHvisBrukerErFunnet() { + void fetchBruker_kasterIkkeExceptionOgReturnererBrukerHvisBrukerErFunnet() { when(brukerRepository.findBrukerByBrukerId(any())).thenReturn(Optional.of(Bruker.builder().build())); Bruker b = brukerService.fetchBruker("test"); assertThat(b, is(notNullValue())); } @Test - public void fetchBruker_kasterExceptionHvisIngenBrukerFunnet() { + void fetchBruker_kasterExceptionHvisIngenBrukerFunnet() { when(brukerRepository.findBrukerByBrukerId(any())).thenReturn(Optional.empty()); Assertions.assertThrows(NotFoundException.class, () -> brukerService.fetchBruker(BRUKERID)); } @Test - public void getBruker_KallerRepoHentBrukere() { + void getBruker_KallerRepoHentBrukere() { brukerService.fetchBrukere(); verify(brukerRepository).findAllByOrderById(); } @Test - public void fetchOrCreateBruker_saveKallesVedNotFoundException() { + void fetchOrCreateBruker_saveKallesVedNotFoundException() { brukerService.fetchOrCreateBruker("tullestring"); verify(brukerRepository).save(any()); } @Test - public void saveBrukerTilDB_kasterExceptionNarDBConstrainBrytes() { + void saveBrukerTilDB_kasterExceptionNarDBConstrainBrytes() { when(brukerRepository.save(any(Bruker.class))).thenThrow(DataIntegrityViolationException.class); Assertions.assertThrows(ConstraintViolationException.class, () -> brukerService.saveBrukerTilDB(Bruker.builder().build())); } @Test - public void leggTilFavoritter_medGrupperIDer() { + void leggTilFavoritter_medGrupperIDer() { Long ID = 1L; Testgruppe testgruppe = Testgruppe.builder().navn("gruppe").hensikt("hen").build(); Bruker bruker = Bruker.builder().brukerId(BRUKERID).favoritter(new HashSet<>()).build(); @@ -110,7 +113,7 @@ public void leggTilFavoritter_medGrupperIDer() { } @Test - public void fjernFavoritter_medGrupperIDer() { + void fjernFavoritter_medGrupperIDer() { Long ID = 1L; Bruker bruker = Bruker.builder().brukerId(BRUKERID).build(); Testgruppe testgruppe = Testgruppe.builder().navn("gruppe").id(ID).opprettetAv(bruker).hensikt("hen").build(); @@ -140,7 +143,7 @@ public void fjernFavoritter_medGrupperIDer() { } @Test - public void fetchBrukere() { + void fetchBrukere() { brukerService.fetchBrukere(); @@ -148,7 +151,7 @@ public void fetchBrukere() { } @Test - public void sletteBrukerFavoritterByGroupId() { + void sletteBrukerFavoritterByGroupId() { long groupId = 1L; @@ -156,9 +159,4 @@ public void sletteBrukerFavoritterByGroupId() { verify(brukerRepository).deleteBrukerFavoritterByGroupId(groupId); } - - @BeforeEach - public void setup() { - MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); - } } \ No newline at end of file diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/IdentServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/IdentServiceTest.java index 27f5df89b80..9fe477aa4e1 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/IdentServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/IdentServiceTest.java @@ -20,7 +20,7 @@ import static org.mockito.Mockito.when; @ExtendWith(MockitoExtension.class) -public class IdentServiceTest { +class IdentServiceTest { private static final String STANDARD_IDENTER_1 = "en"; @@ -45,7 +45,7 @@ public void setup() { } @Test - public void saveIdentTilGruppe_saveAvIdentInnholderInputIdentstringOgTestgruppe() { + void saveIdentTilGruppe_saveAvIdentInnholderInputIdentstringOgTestgruppe() { when(identRepository.save(any())).thenReturn(new Testident()); identService.saveIdentTilGruppe(STANDARD_IDENTER_1, standardGruppe, Testident.Master.PDLF, null); @@ -60,7 +60,7 @@ public void saveIdentTilGruppe_saveAvIdentInnholderInputIdentstringOgTestgruppe( } @Test - public void slettTestident_ok() { + void slettTestident_ok() { String ident = "1"; @@ -70,7 +70,7 @@ public void slettTestident_ok() { } @Test - public void slettTestidenterByGruppeId_ok() { + void slettTestidenterByGruppeId_ok() { long gruppeId = 1L; diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java index 9926499ec5e..21c034cb3d1 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java @@ -42,7 +42,7 @@ @EnableAutoConfiguration @ComponentScan("no.nav.dolly") @AutoConfigureMockMvc(addFilters = false) -public class OrganisasjonBestillingMalServiceTest { +class OrganisasjonBestillingMalServiceTest { private final static String MALNAVN = "test"; private final static String NYTT_MALNAVN = "nyttMalnavn"; diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/TestgruppeServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/TestgruppeServiceTest.java index 0e62f7d377f..e92f0f6decd 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/TestgruppeServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/TestgruppeServiceTest.java @@ -51,7 +51,7 @@ @ExtendWith(MockitoExtension.class) @MockitoSettings(strictness = Strictness.LENIENT) -public class TestgruppeServiceTest { +class TestgruppeServiceTest { private final static String BRUKERID = "123"; private final static String BRUKERNAVN = "BRUKER"; @@ -101,8 +101,13 @@ public void setup() { testGruppe = Testgruppe.builder().id(GROUP_ID).testidenter(gruppe).hensikt("test").build(); } + @BeforeEach + public void establishSecurity() { + MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); + } + @Test - public void opprettTestgruppe_HappyPath() { + void opprettTestgruppe_HappyPath() { RsOpprettEndreTestgruppe rsTestgruppe = mock(RsOpprettEndreTestgruppe.class); Bruker bruker = mock(Bruker.class); @@ -120,7 +125,7 @@ public void opprettTestgruppe_HappyPath() { } @Test - public void fetchTestgruppeById_KasterExceptionHvisGruppeIkkeErFunnet() throws Exception { + void fetchTestgruppeById_KasterExceptionHvisGruppeIkkeErFunnet() throws Exception { Optional op = Optional.empty(); when(testgruppeRepository.findById(any())).thenReturn(op); @@ -129,7 +134,7 @@ public void fetchTestgruppeById_KasterExceptionHvisGruppeIkkeErFunnet() throws E } @Test - public void fetchTestgruppeById_ReturnererGruppeHvisGruppeMedIdFinnes() throws Exception { + void fetchTestgruppeById_ReturnererGruppeHvisGruppeMedIdFinnes() throws Exception { Testgruppe g = mock(Testgruppe.class); Optional op = Optional.of(g); when(testgruppeRepository.findById(any())).thenReturn(op); @@ -140,7 +145,7 @@ public void fetchTestgruppeById_ReturnererGruppeHvisGruppeMedIdFinnes() throws E } @Test - public void fetchTestgrupperByTFavoritterOfBruker() { + void fetchTestgrupperByTFavoritterOfBruker() { Testgruppe tg1 = Testgruppe.builder().id(1L).navn("test1").build(); Testgruppe tg2 = Testgruppe.builder().id(2L).navn("test2").build(); Testgruppe tg3 = Testgruppe.builder().id(3L).navn("test3").build(); @@ -161,7 +166,7 @@ public void fetchTestgrupperByTFavoritterOfBruker() { } @Test - public void saveGruppeTilDB_returnererTestgruppeHvisTestgruppeFinnes() { + void saveGruppeTilDB_returnererTestgruppeHvisTestgruppeFinnes() { Testgruppe g = new Testgruppe(); when(testgruppeRepository.save(any())).thenReturn(g); @@ -170,7 +175,7 @@ public void saveGruppeTilDB_returnererTestgruppeHvisTestgruppeFinnes() { } @Test - public void slettGruppeById_deleteBlirKaltMotRepoMedGittId() { + void slettGruppeById_deleteBlirKaltMotRepoMedGittId() { when(testgruppeRepository.findById(GROUP_ID)).thenReturn(Optional.of(testGruppe)); testgruppeService.deleteGruppeById(GROUP_ID); verify(brukerService).sletteBrukerFavoritterByGroupId(GROUP_ID); @@ -178,41 +183,41 @@ public void slettGruppeById_deleteBlirKaltMotRepoMedGittId() { } @Test - public void saveGruppeTilDB_kasterExceptionHvisDBConstraintErBrutt() { + void saveGruppeTilDB_kasterExceptionHvisDBConstraintErBrutt() { when(testgruppeRepository.save(any())).thenThrow(DataIntegrityViolationException.class); Assertions.assertThrows(ConstraintViolationException.class, () -> testgruppeService.saveGruppeTilDB(new Testgruppe())); } @Test - public void saveGruppeTilDB_kasterDollyExceptionHvisDBConstraintErBrutt() { + void saveGruppeTilDB_kasterDollyExceptionHvisDBConstraintErBrutt() { when(testgruppeRepository.save(any())).thenThrow(nonTransientDataAccessException); Assertions.assertThrows(DollyFunctionalException.class, () -> testgruppeService.saveGruppeTilDB(new Testgruppe())); } @Test - public void saveGrupper_kasterExceptionHvisDBConstraintErBrutt() { + void saveGrupper_kasterExceptionHvisDBConstraintErBrutt() { when(testgruppeRepository.save(any(Testgruppe.class))).thenThrow(DataIntegrityViolationException.class); Assertions.assertThrows(ConstraintViolationException.class, () -> testgruppeService.saveGrupper(new HashSet<>(singletonList(new Testgruppe())))); } @Test - public void saveGrupper_kasterDollyExceptionHvisDBConstraintErBrutt() { + void saveGrupper_kasterDollyExceptionHvisDBConstraintErBrutt() { when(testgruppeRepository.save(any(Testgruppe.class))).thenThrow(nonTransientDataAccessException); Assertions.assertThrows(DollyFunctionalException.class, () -> testgruppeService.saveGrupper(new HashSet<>(singletonList(new Testgruppe())))); } @Test - public void fetchGrupperByIdsIn_kasterExceptionOmGruppeIkkeFinnes() { + void fetchGrupperByIdsIn_kasterExceptionOmGruppeIkkeFinnes() { Assertions.assertThrows(NotFoundException.class, () -> testgruppeService.fetchGrupperByIdsIn(singletonList(anyLong()))); } @Test - public void oppdaterTestgruppe_sjekkAtDBKalles() { + void oppdaterTestgruppe_sjekkAtDBKalles() { RsOpprettEndreTestgruppe rsOpprettEndreTestgruppe = RsOpprettEndreTestgruppe.builder().hensikt("test").navn("navn").build(); @@ -223,14 +228,9 @@ public void oppdaterTestgruppe_sjekkAtDBKalles() { } @Test - public void getTestgrupper() { + void getTestgrupper() { when(testgruppeRepository.findAllByOrderByIdDesc(any(Pageable.class))).thenReturn(new PageImpl<>(emptyList())); testgruppeService.getTestgruppeByBrukerId(0, 10, null); verify(testgruppeRepository).findAllByOrderByIdDesc(Pageable.ofSize(10)); } - - @BeforeEach - public void establishSecurity() { - MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); - } } \ No newline at end of file diff --git a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/Health.java b/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/Health.java deleted file mode 100644 index 4f18c4b9b27..00000000000 --- a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/Health.java +++ /dev/null @@ -1,15 +0,0 @@ -//package no.nav.testnav.libs.reactivecore.health; -// -//import lombok.experimental.UtilityClass; -// -//@UtilityClass -//public class Health { -// -// public static final String UP = "UP"; -// public static final String PAUSED = "PAUSED"; -// public static final String DISABLED = "DISABLED"; -// public static final String OUT_OF_SERVICE = "OUT_OF_SERVICE"; -// public static final String DOWN = "DOWN"; -//} - -//TODO: MÅ SKRIVE OM TIL Å FUNGERE MED ACTUATOR OG SPRING BOOT 3 \ No newline at end of file diff --git a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterAutoConfig.java b/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterAutoConfig.java deleted file mode 100644 index 47e580a1d5e..00000000000 --- a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterAutoConfig.java +++ /dev/null @@ -1,34 +0,0 @@ -//package no.nav.testnav.libs.reactivecore.health; -// -//import org.springframework.boot.actuate.autoconfigure.health.HealthContributorAutoConfiguration; -//import org.springframework.boot.actuate.health.HealthContributorRegistry; -//import org.springframework.boot.actuate.health.SimpleStatusAggregator; -//import org.springframework.boot.actuate.health.StatusAggregator; -//import org.springframework.boot.autoconfigure.AutoConfigureAfter; -//import org.springframework.context.annotation.Bean; -//import org.springframework.context.annotation.Configuration; -// -//import java.util.List; -// -//@Configuration(proxyBeanMethods = false) -//@AutoConfigureAfter(HealthContributorAutoConfiguration.class) -//public class HealthToMeterAutoConfig { -// -// @Bean -// public HealthToMeterBinder healthToMeterBinder(HealthContributorRegistry registry) { -// return new HealthToMeterBinder(registry); -// } -// -// @Bean -// public StatusAggregator statusAggregator() { -// return new SimpleStatusAggregator(List.of( -// Health.DOWN, -// Health.OUT_OF_SERVICE, -// Health.DISABLED, -// Health.PAUSED, -// Health.UP -// )); -// } -//} - -//TODO: MÅ SKRIVE OM TIL Å FUNGERE MED ACTUATOR OG SPRING BOOT 3 \ No newline at end of file diff --git a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterBinder.java b/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterBinder.java deleted file mode 100644 index ac33ee1b2ee..00000000000 --- a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/health/HealthToMeterBinder.java +++ /dev/null @@ -1,45 +0,0 @@ -//package no.nav.testnav.libs.reactivecore.health; -// -//import io.micrometer.core.instrument.Gauge; -//import io.micrometer.core.instrument.MeterRegistry; -//import io.micrometer.core.instrument.binder.MeterBinder; -//import lombok.RequiredArgsConstructor; -//import lombok.val; -//import org.springframework.boot.actuate.health.HealthContributorRegistry; -//import org.springframework.boot.actuate.health.HealthIndicator; -// -//import java.util.function.ToDoubleFunction; -// -//@RequiredArgsConstructor -//public class HealthToMeterBinder implements MeterBinder { -// -// private final HealthContributorRegistry registry; -// -// @Override -// public void bindTo(MeterRegistry meterRegistry) { -// registry.stream() -// .filter(e -> e.getContributor() instanceof HealthIndicator) -// .forEach(e -> bind(e.getName(), (HealthIndicator) e.getContributor(), meterRegistry)); -// } -// -// private void bind(String key, HealthIndicator healthIndicator, MeterRegistry registry) { -// Gauge.builder("health", healthIndicator, statusToDouble()).tag("name", key).register(registry); -// } -// -// private ToDoubleFunction statusToDouble() { -// -// return value -> { -// val status = value.health().getStatus().getCode(); -// -// return switch (status) { -// case Health.UP -> 1; -// case Health.PAUSED -> 2; -// case Health.DISABLED -> 3; -// case Health.DOWN, Health.OUT_OF_SERVICE -> 4; -// default -> 5; -// }; -// }; -// } -//} - -//TODO: MÅ SKRIVE OM TIL Å FUNGERE MED ACTUATOR OG SPRING BOOT 3 \ No newline at end of file diff --git a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/router/InternalRouter.java b/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/router/InternalRouter.java index 667911d15e3..7b106a5c994 100644 --- a/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/router/InternalRouter.java +++ b/libs/reactive-core/src/main/java/no/nav/testnav/libs/reactivecore/router/InternalRouter.java @@ -2,8 +2,6 @@ import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; -import org.springframework.http.MediaType; -import org.springframework.web.reactive.function.server.RenderingResponse; import org.springframework.web.reactive.function.server.RequestPredicates; import org.springframework.web.reactive.function.server.RouterFunction; import org.springframework.web.reactive.function.server.RouterFunctions; From 0a93d830a187b159f6c7dc074f04b4d0ae454a58 Mon Sep 17 00:00:00 2001 From: stigus Date: Wed, 4 Oct 2023 14:24:19 +0200 Subject: [PATCH 02/18] =?UTF-8?q?Stor=20refaktorering=20til=20ny=20versjon?= =?UTF-8?q?=20av=20Gradle,=20Spring=20og=20Java=20Forel=C3=B8ig=20versjon?= =?UTF-8?q?=2020=20for=20Java,=20skal=20migrere=20til=2021=20s=C3=A5=20for?= =?UTF-8?q?t=20Gradle=20og=20Temurin=20images=20har=20st=C3=B8tte=20for=20?= =?UTF-8?q?det?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/adresse-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/VaultLocalConfig.java | 14 ++- .../service/PdlAdresseService.java | 4 +- apps/amelding-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../ameldingservice/config/DevConfig.java | 14 ++- .../ameldingservice/domain/AMelding.java | 44 ++++---- apps/app-tilgang-analyse-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/LocalConfig.java | 13 ++- .../domain/Access.java | 9 +- .../domain/ApplicationConfig.java | 22 ++-- .../domain/SearchResults.java | 2 +- .../dto/ApplicationDTO.java | 1 - .../repository/DocumentReadConverter.java | 11 +- .../service/ReadConfigService.java | 9 +- apps/arbeidsforhold-export-api/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevVaultConfig.java | 13 ++- .../domain/v2_0/Opplysningspliktig.java | 85 +++++++------- .../domain/v2_1/Opplysningspliktig.java | 85 +++++++------- .../ArbeidsforholdExportController.java | 8 +- .../provider/FileController.java | 4 +- .../InntektsmottakerHendelseRepository.java | 28 ++--- apps/arbeidsforhold-service/build.gradle | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../consumer/AaregConsumer.java | 3 +- .../domain/Arbeidsforhold.java | 13 +-- .../provider/v2/ArbeidstakerController.java | 4 +- .../service/ArbeidsforholdService.java | 3 +- apps/batch-bestilling-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 10 +- .../request/RsDollyBestillingRequest.java | 2 +- apps/brreg-stub/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../nav/brregstub/config/DevVaultConfig.java | 6 +- .../nav/brregstub/mapper/HentRolleMapper.java | 17 ++- .../no/nav/brregstub/ws/BrregEndpoint.java | 10 +- .../endpoint/rs/v1/KodeControllerTest.java | 6 +- .../rs/v2/RolleoversiktControllerTest.java | 14 +-- .../brregstub/service/BrregServiceTest.java | 4 +- apps/bruker-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../brukerservice/config/JacksonConfig.java | 1 + .../brukerservice/config/LocalConfig.java | 14 ++- .../brukerservice/repository/UserEntity.java | 1 - .../brukerservice/service/UserService.java | 17 ++- apps/dolly-backend/build.gradle | 14 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../mapper/TpsMessagingMappingStrategy.java | 5 +- .../java/no/nav/dolly/config/LocalConfig.java | 4 +- .../aareg/util/JsonDateDeserializer.java | 15 --- .../aareg/util/AaaregUtilityTest.java | 4 +- apps/dolly-frontend/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../dolly/web/config/LocalVaultConfig.java | 14 ++- apps/dollystatus/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/endringsmelding-frontend/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- apps/endringsmelding-service/build.gradle | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../config/JacksonConfig.java | 1 + .../endringsmeldingservice/domain/Status.java | 7 +- apps/ereg-batch-status-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- apps/faste-data-frontend/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../fastedatafrontend/config/DevConfig.java | 14 ++- .../ForwardAndRedirectController.java | 6 +- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 16 ++- .../GenererArbeidsforholdController.java | 4 +- .../domain/Organisajon.java | 19 +--- .../domain/Timeline.java | 12 +- .../domain/TimelineEntries.java | 3 +- .../service/OppsummeringsdokumentService.java | 17 ++- .../service/OrkestratorService.java | 1 - .../PersonArbeidsforholdHistorkkService.java | 15 +-- apps/generer-navn-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../generernavnservice/config/DevConfig.java | 14 ++- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 16 ++- .../GenererOpplysningspliktigService.java | 13 +-- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../geografiske-kodeverk-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../exceptions/DollyFunctionalException.java | 8 ++ .../service/KodeverkService.java | 43 ++++---- apps/helsepersonell-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- apps/hodejegeren/build.gradle | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../apps/hodejegeren/config/VaultConfig.java | 14 ++- .../provider/HodejegerenController.java | 14 +-- apps/import-person-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../importpersonservice/config/DevConfig.java | 14 ++- .../domain/PersonList.java | 11 +- .../build.gradle | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../validation/XML201809Validator.java | 3 +- .../v20181211/dto/v1/DelvisFravearDTO.java | 6 +- .../v20181211/dto/v1/EndringIRefusjonDTO.java | 6 +- .../dto/v1/GraderingIForeldrepengerDTO.java | 4 +- .../dto/v1/NaturalYtelseDetaljerDTO.java | 4 +- .../v20181211/dto/v1/PeriodeDTO.java | 4 +- .../dto/v1/UtsettelseAvForeldrepengerDTO.java | 4 +- apps/inntektsmelding-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../jenkins-batch-status-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- ...sBatchStatusServiceApplicationStarter.java | 1 - .../config/DevConfig.java | 14 ++- .../service/RetryService.java | 6 +- apps/joark-dokument-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../command/GetDokumentInfoCommand.java | 4 +- .../controller/v1/DokumentController.java | 3 +- apps/miljoer-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../miljoerservice/config/DevConfig.java | 14 ++- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../adapter/IdentAdapter.java | 2 - .../config/VaultConfig.java | 16 ++- .../OppsummeringsdokumentConsumer.java | 33 +++--- .../domain/Organisajon.java | 15 +-- .../ArbeidsforholdHistorikkService.java | 104 +++++++++--------- .../service/OpplysningspliktigService.java | 43 ++++---- .../build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../adapter/OppsummeringsdokumentAdapter.java | 26 +++-- .../config/DevConfig.java | 14 ++- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../repository/v1/OrderRepository.java | 4 +- .../service/v2/OrderServiceV2.java | 6 +- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 14 ++- .../domain/Organisasjon.java | 38 +++---- .../service/OrganisasjonService.java | 9 +- apps/organisasjon-forvalter/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/LocalConfig.java | 4 +- .../OrganisasjonOrgnummerServiceConsumer.java | 5 +- .../OrganisasjonBestillingCommand.java | 8 +- .../OrganisasjonBestillingIdsCommand.java | 4 +- .../OrganisasjonBestillingStatusCommand.java | 34 +++--- .../jpa/entity/Status.java | 17 ++- .../service/ClearCacheService.java | 2 +- .../service/DrivervirksomheterService.java | 3 +- .../service/OrdreService.java | 43 ++++---- .../util/CurrentAuthentication.java | 10 +- apps/organisasjon-mottak-service/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../organisasjonmottak/config/DevConfig.java | 14 ++- .../consumer/JenkinsConsumer.java | 3 +- .../listener/OrganisasjonMottakListener.java | 3 +- apps/organisasjon-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../organisasjonservice/config/DevConfig.java | 14 ++- .../domain/Organisasjon.java | 17 +-- .../build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- ...sjonTilgangFrontendApplicationStarter.java | 24 ++-- .../config/LocalVaultConfig.java | 14 ++- .../organisasjon-tilgang-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/JacksonConfig.java | 1 + .../config/LocalVaultConfig.java | 14 ++- .../CreateOrganisasjonAccessCommand.java | 2 +- .../altinn/v1/command/GetRightsCommand.java | 2 +- .../maskinporten/v1/MaskinportenConsumer.java | 18 +-- .../v1/command/GetAccessTokenCommand.java | 2 +- .../v1/command/GetWellKnownCommand.java | 2 +- apps/orgnummer-service/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../orgnrservice/config/DevConfig.java | 14 ++- apps/oversikt-frontend/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../oversiktfrontend/config/DevConfig.java | 14 ++- .../PersonOrganisasjonTilgangConsumer.java | 2 +- .../consumer/dto/OrganisasjonDTO.java | 2 - apps/pdl-forvalter/build.gradle | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../nav/pdl/forvalter/config/LocalConfig.java | 14 ++- .../consumer/command/IdentpoolGetCommand.java | 22 ++-- .../command/IdentpoolGetLedigCommand.java | 22 ++-- .../command/IdentpoolPostCommand.java | 59 +++++----- .../command/IdentpoolPostVoidCommand.java | 18 +-- .../service/BostedAdresseService.java | 8 +- .../forvalter/utils/DatoFraIdentUtility.java | 2 - .../pdl/forvalter/utils/IdentValidCheck.java | 5 +- apps/person-export-api/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../personexportapi/config/VaultConfig.java | 14 ++- apps/person-faste-data-service/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 16 ++- .../build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../client/altinn/v1/AltinnClient.java | 16 ++- .../maskinporten/v1/MaskinportenClient.java | 11 +- .../v1/command/GetAccessTokenCommand.java | 7 +- .../v1/command/GetWellKnownCommand.java | 7 +- .../config/JacksonConfig.java | 1 + apps/person-search-service/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevVaultConfig.java | 14 ++- .../service/utils/IdentifikasjonUtils.java | 2 +- apps/person-service/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../apps/personservice/config/DevConfig.java | 5 +- .../personservice/config/JacksonConfig.java | 1 + apps/profil-api/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../testnorge/profil/config/DevConfig.java | 14 ++- .../PersonOrganisasjonTilgangConsumer.java | 2 +- .../profil/service/ProfilService.java | 36 +++--- apps/sykemelding-api/build.gradle | 12 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../sykemelding/config/DevConfig.java | 14 ++- .../sykemelding/domain/Sykemelding.java | 4 +- .../eiFellesformat/ObjectFactory.java | 10 +- apps/synt-sykemelding-api/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../syntsykemeldingapi/config/DevConfig.java | 14 ++- .../build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/DevConfig.java | 13 ++- apps/testnav-ident-pool/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../testnav/identpool/config/LocalConfig.java | 14 ++- .../meter/PrometheusTagsProvider.java | 27 ----- apps/testnorge-bisys/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../registre/bisys/config/VaultConfig.java | 6 +- .../bisys/domain/search/PersonSearch.java | 8 +- .../build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../sdforvalter/adapter/EregTagAdapter.java | 10 +- .../sdforvalter/config/DevConfig.java | 16 ++- .../sdforvalter/service/AaregService.java | 7 +- apps/testnorge-tp/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../registre/tp/config/dev/VaultConfig.java | 14 ++- .../tp/provider/OrkestreringController.java | 4 +- apps/tilbakemelding-api/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../tilbakemeldingapi/config/DevConfig.java | 14 ++- .../service/TilbakemeldingService.java | 9 +- apps/tps-messaging-service/build.gradle | 14 +-- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/VaultLocalConfig.java | 14 ++- .../factory/HealthConnectionFactory.java | 2 +- apps/udi-stub/build.gradle | 10 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../java/no/nav/udistub/config/DevConfig.java | 4 +- apps/varslinger-service/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../varslingerservice/config/LocalConfig.java | 6 +- examples/reactive-rest-example/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/LocalConfig.java | 13 ++- gradle/wrapper/gradle-wrapper.properties | 2 +- libs/avro-schema/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/commands/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/csv-converter/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/data-transfer-objects/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../aareg/v1/ArbeidsgiverArbeidsforhold.java | 8 +- .../libs/dto/eregmapper/v1/AdresseDTO.java | 1 - .../libs/dto/eregmapper/v1/NavnDTO.java | 1 - .../v1/rs/RsAvsendersystem.java | 1 - .../organiasjonbestilling/v2/StatusDTO.java | 27 ++--- .../pdlforvalter/v1/SikkerhetstiltakDTO.java | 4 +- .../libs/dto/sykemelding/v1/DiagnoseDTO.java | 1 - libs/database/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/domain/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../domain/dto/skd/v1/MeldingStatusDTO.java | 1 - libs/integration-test/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/kafka-config/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/kafka-producers/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/reactive-core/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/reactive-frontend/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/reactive-proxy/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../libs/reactiveproxy/config/DevConfig.java | 14 ++- .../filter/MonoRequestBuilder.java | 1 - libs/reactive-security/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../exchange/TokenExchange.java | 2 +- .../TrygdeetatenAzureAdTokenService.java | 2 +- .../JwtReactiveAuthenticationManager.java | 4 +- libs/reactive-session-security/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../domain/idporten/WellKnownConfig.java | 2 - .../exchange/TokenExchange.java | 2 +- .../WebClientReactiveTokenResponseClient.java | 4 +- .../resolver/Oauth2AuthenticationToken.java | 7 +- libs/security-core/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/security-token-service/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/servlet-core/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/servlet-insecure-security/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../decoder/MultipleIssuersJwtDecoder.java | 2 +- .../exchange/TokenExchange.java | 2 +- libs/servlet-security/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../decoder/MultipleIssuersJwtDecoder.java | 2 +- .../exchange/TokenExchange.java | 2 +- libs/slack/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../testnav/libs/slack/dto/SlackResponse.java | 1 - libs/testing/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../libs/testing/JsonWiremockHelper.java | 81 +++++++------- mocks/maskinporten-mock/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- mocks/tokendings-mock/build.gradle | 8 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/aareg-proxy/build.gradle | 6 +- .../aareg-synt-services-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/arbeidsplassencv-proxy/build.gradle | 6 +- proxies/arena-forvalteren-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/batch-adeo-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/brregstub-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/dokarkiv-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/LocalVaultConfig.java | 15 +-- proxies/ereg-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/histark-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/hodejegeren-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/inntektstub-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/inst-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/kodeverk-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../kontoregister-person-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/LocalVaultConfig.java | 14 ++- proxies/krrstub-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../krrstubproxy/config/LocalVaultConfig.java | 14 ++- proxies/medl-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../medlproxy/config/LocalVaultConfig.java | 14 ++- proxies/norg2-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../proxies/norg2proxy/StatusController.java | 2 +- proxies/pdl-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../pdlproxy/config/DevVaultConfig.java | 14 ++- .../build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/LocalVaultConfig.java | 14 ++- proxies/saf-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/sigrunstub-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/skjermingsregister-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../DevVaultConfig.java | 14 ++- .../statisk-data-forvalter-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../synthdata-meldekort-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/VaultConfig.java | 14 ++- proxies/tps-forvalteren-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../config/VaultDevConfig.java | 14 ++- proxies/udistub-proxy/build.gradle | 6 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- xsd/arbeidsforhold-xsd/build.gradle | 4 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 415 files changed, 1763 insertions(+), 1675 deletions(-) delete mode 100644 apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateDeserializer.java create mode 100644 apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/exceptions/DollyFunctionalException.java delete mode 100644 apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/meter/PrometheusTagsProvider.java diff --git a/apps/adresse-service/build.gradle b/apps/adresse-service/build.gradle index b451ef958c1..458aa20b901 100644 --- a/apps/adresse-service/build.gradle +++ b/apps/adresse-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,8 +68,8 @@ dependencies { implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -77,4 +77,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties b/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/VaultLocalConfig.java b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/VaultLocalConfig.java index 0fa1669701d..655a3fbe046 100644 --- a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/VaultLocalConfig.java +++ b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/VaultLocalConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class VaultLocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/service/PdlAdresseService.java b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/service/PdlAdresseService.java index 25d53e60540..f4e573fbc69 100644 --- a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/service/PdlAdresseService.java +++ b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/service/PdlAdresseService.java @@ -83,7 +83,7 @@ public List getVegadresse(VegadresseRequest request, Long antall) buildCriteria("random", random.nextDouble(), RANDOM) ) .filter(Objects::nonNull) - .collect(Collectors.toList()) + .toList() )) .build()); @@ -118,7 +118,7 @@ public List getMatrikkelAdresse(MatrikkeladresseRequest req buildCriteria("random", random.nextDouble(), RANDOM) ) .filter(Objects::nonNull) - .collect(Collectors.toList()) + .toList() )) .build()); diff --git a/apps/amelding-service/build.gradle b/apps/amelding-service/build.gradle index b0bf3ec81ee..b3f52afe1ef 100644 --- a/apps/amelding-service/build.gradle +++ b/apps/amelding-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -71,8 +71,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -82,4 +82,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/DevConfig.java b/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/DevConfig.java index ffeef0d9109..c6e8cf67288 100644 --- a/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/DevConfig.java +++ b/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/domain/AMelding.java b/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/domain/AMelding.java index 8e26eb1255a..a239ca91bdc 100644 --- a/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/domain/AMelding.java +++ b/apps/amelding-service/src/main/java/no/nav/registre/testnav/ameldingservice/domain/AMelding.java @@ -1,10 +1,6 @@ package no.nav.registre.testnav.ameldingservice.domain; import lombok.RequiredArgsConstructor; - -import java.time.LocalDate; -import java.util.stream.Collectors; - import no.nav.testnav.libs.dto.ameldingservice.v1.AMeldingDTO; import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.ArbeidsforholdDTO; import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.AvvikDTO; @@ -15,6 +11,8 @@ import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.PersonDTO; import no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v2.VirksomhetDTO; +import java.time.LocalDate; + @RequiredArgsConstructor public class AMelding { private final AMeldingDTO dto; @@ -92,10 +90,10 @@ private void merge(PersonDTO target, no.nav.testnav.libs.dto.ameldingservice.v1. private void merge(ArbeidsforholdDTO target, no.nav.testnav.libs.dto.ameldingservice.v1.ArbeidsforholdDTO other) { target.setArbeidstidsordning(other.getArbeidstidsordning()); - target.setAvvik(other.getAvvik().stream().map(this::create).collect(Collectors.toList())); + target.setAvvik(other.getAvvik().stream().map(this::create).toList()); target.setFartoey(create(other.getFartoey())); - target.setInntekter(other.getInntekter().stream().map(this::create).collect(Collectors.toList())); - target.setPermisjoner(other.getPermisjoner().stream().map(this::create).collect(Collectors.toList())); + target.setInntekter(other.getInntekter().stream().map(this::create).toList()); + target.setPermisjoner(other.getPermisjoner().stream().map(this::create).toList()); target.setAntallTimerPerUke(other.getAntallTimerPerUke()); target.setSluttdato(other.getSluttdato()); target.setStartdato(other.getStartdato()); @@ -116,7 +114,7 @@ private OppsummeringsdokumentDTO create(AMeldingDTO aMeldingDTO) { .builder() .kalendermaaned(aMeldingDTO.getKalendermaaned()) .opplysningspliktigOrganisajonsnummer(aMeldingDTO.getOpplysningspliktigOrganisajonsnummer()) - .virksomheter(aMeldingDTO.getVirksomheter().stream().map(this::create).collect(Collectors.toList())) + .virksomheter(aMeldingDTO.getVirksomheter().stream().map(this::create).toList()) .version(1L) .build(); } @@ -126,7 +124,7 @@ private AMeldingDTO create(OppsummeringsdokumentDTO oppsummeringsdokumentDTO) { .builder() .kalendermaaned(oppsummeringsdokumentDTO.getKalendermaaned()) .opplysningspliktigOrganisajonsnummer(oppsummeringsdokumentDTO.getOpplysningspliktigOrganisajonsnummer()) - .virksomheter(oppsummeringsdokumentDTO.getVirksomheter().stream().map(this::create).collect(Collectors.toList())) + .virksomheter(oppsummeringsdokumentDTO.getVirksomheter().stream().map(this::create).toList()) .build(); } @@ -134,7 +132,7 @@ private VirksomhetDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.Virksomh return VirksomhetDTO .builder() .organisajonsnummer(virksomhet.getOrganisajonsnummer()) - .personer(virksomhet.getPersoner().stream().map(this::create).collect(Collectors.toList())) + .personer(virksomhet.getPersoner().stream().map(this::create).toList()) .build(); } @@ -142,7 +140,7 @@ private no.nav.testnav.libs.dto.ameldingservice.v1.VirksomhetDTO create(Virksomh return no.nav.testnav.libs.dto.ameldingservice.v1.VirksomhetDTO .builder() .organisajonsnummer(virksomhet.getOrganisajonsnummer()) - .personer(virksomhet.getPersoner().stream().map(this::create).collect(Collectors.toList())) + .personer(virksomhet.getPersoner().stream().map(this::create).toList()) .build(); } @@ -150,7 +148,7 @@ private PersonDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.PersonDTO pe return PersonDTO .builder() .ident(personDTO.getIdent()) - .arbeidsforhold(personDTO.getArbeidsforhold().stream().map(this::create).collect(Collectors.toList())) + .arbeidsforhold(personDTO.getArbeidsforhold().stream().map(this::create).toList()) .build(); } @@ -158,7 +156,7 @@ private no.nav.testnav.libs.dto.ameldingservice.v1.PersonDTO create(PersonDTO pe return no.nav.testnav.libs.dto.ameldingservice.v1.PersonDTO .builder() .ident(personDTO.getIdent()) - .arbeidsforhold(personDTO.getArbeidsforhold().stream().map(this::create).collect(Collectors.toList())) + .arbeidsforhold(personDTO.getArbeidsforhold().stream().map(this::create).toList()) .build(); } @@ -168,7 +166,7 @@ private ArbeidsforholdDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.Arbe .antallTimerPerUke(arbeidsforholdDTO.getAntallTimerPerUke()) .arbeidsforholdId(arbeidsforholdDTO.getArbeidsforholdId()) .arbeidstidsordning(arbeidsforholdDTO.getArbeidstidsordning()) - .avvik(arbeidsforholdDTO.getAvvik().stream().map(this::create).collect(Collectors.toList())) + .avvik(arbeidsforholdDTO.getAvvik().stream().map(this::create).toList()) .fartoey(create(arbeidsforholdDTO.getFartoey())) .sisteLoennsendringsdato(arbeidsforholdDTO.getSisteLoennsendringsdato()) .sluttdato(arbeidsforholdDTO.getSluttdato()) @@ -176,8 +174,8 @@ private ArbeidsforholdDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.Arbe .stillingsprosent(arbeidsforholdDTO.getStillingsprosent()) .typeArbeidsforhold(arbeidsforholdDTO.getArbeidsforholdType()) .yrke(arbeidsforholdDTO.getYrke()) - .inntekter(arbeidsforholdDTO.getInntekter().stream().map(this::create).collect(Collectors.toList())) - .permisjoner(arbeidsforholdDTO.getPermisjoner().stream().map(this::create).collect(Collectors.toList())) + .inntekter(arbeidsforholdDTO.getInntekter().stream().map(this::create).toList()) + .permisjoner(arbeidsforholdDTO.getPermisjoner().stream().map(this::create).toList()) .build(); } @@ -187,7 +185,7 @@ private no.nav.testnav.libs.dto.ameldingservice.v1.ArbeidsforholdDTO create(Arbe .antallTimerPerUke(arbeidsforholdDTO.getAntallTimerPerUke()) .arbeidsforholdId(arbeidsforholdDTO.getArbeidsforholdId()) .arbeidstidsordning(arbeidsforholdDTO.getArbeidstidsordning()) - .avvik(arbeidsforholdDTO.getAvvik().stream().map(this::create).collect(Collectors.toList())) + .avvik(arbeidsforholdDTO.getAvvik().stream().map(this::create).toList()) .fartoey(create(arbeidsforholdDTO.getFartoey())) .sisteLoennsendringsdato(arbeidsforholdDTO.getSisteLoennsendringsdato()) .sluttdato(arbeidsforholdDTO.getSluttdato()) @@ -195,15 +193,15 @@ private no.nav.testnav.libs.dto.ameldingservice.v1.ArbeidsforholdDTO create(Arbe .stillingsprosent(arbeidsforholdDTO.getStillingsprosent()) .arbeidsforholdType(arbeidsforholdDTO.getTypeArbeidsforhold()) .yrke(arbeidsforholdDTO.getYrke()) - .inntekter(arbeidsforholdDTO.getInntekter().stream().map(this::create).collect(Collectors.toList())) - .permisjoner(arbeidsforholdDTO.getPermisjoner().stream().map(this::create).collect(Collectors.toList())) + .inntekter(arbeidsforholdDTO.getInntekter().stream().map(this::create).toList()) + .permisjoner(arbeidsforholdDTO.getPermisjoner().stream().map(this::create).toList()) .build(); } private PermisjonDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.PermisjonDTO permisjonDTO) { return PermisjonDTO .builder() - .avvik(permisjonDTO.getAvvik().stream().map(this::create).collect(Collectors.toList())) + .avvik(permisjonDTO.getAvvik().stream().map(this::create).toList()) .beskrivelse(permisjonDTO.getBeskrivelse()) .permisjonId(permisjonDTO.getPermisjonId()) .permisjonsprosent(permisjonDTO.getPermisjonsprosent()) @@ -215,7 +213,7 @@ private PermisjonDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.Permisjon private no.nav.testnav.libs.dto.ameldingservice.v1.PermisjonDTO create(PermisjonDTO permisjonDTO) { return no.nav.testnav.libs.dto.ameldingservice.v1.PermisjonDTO .builder() - .avvik(permisjonDTO.getAvvik().stream().map(this::create).collect(Collectors.toList())) + .avvik(permisjonDTO.getAvvik().stream().map(this::create).toList()) .beskrivelse(permisjonDTO.getBeskrivelse()) .permisjonId(permisjonDTO.getPermisjonId()) .permisjonsprosent(permisjonDTO.getPermisjonsprosent()) @@ -228,7 +226,7 @@ private InntektDTO create(no.nav.testnav.libs.dto.ameldingservice.v1.InntektDTO return InntektDTO .builder() .antall(inntektDTO.getAntall()) - .avvik(inntektDTO.getAvvik().stream().map(this::create).collect(Collectors.toList())) + .avvik(inntektDTO.getAvvik().stream().map(this::create).toList()) .opptjeningsland(inntektDTO.getOpptjeningsland()) .sluttdatoOpptjeningsperiode(inntektDTO.getSluttdatoOpptjeningsperiode()) .startdatoOpptjeningsperiode(inntektDTO.getStartdatoOpptjeningsperiode()) @@ -239,7 +237,7 @@ private no.nav.testnav.libs.dto.ameldingservice.v1.InntektDTO create(InntektDTO return no.nav.testnav.libs.dto.ameldingservice.v1.InntektDTO .builder() .antall(inntektDTO.getAntall()) - .avvik(inntektDTO.getAvvik().stream().map(this::create).collect(Collectors.toList())) + .avvik(inntektDTO.getAvvik().stream().map(this::create).toList()) .opptjeningsland(inntektDTO.getOpptjeningsland()) .sluttdatoOpptjeningsperiode(inntektDTO.getSluttdatoOpptjeningsperiode()) .startdatoOpptjeningsperiode(inntektDTO.getStartdatoOpptjeningsperiode()) diff --git a/apps/app-tilgang-analyse-service/build.gradle b/apps/app-tilgang-analyse-service/build.gradle index f0ccf90a813..ee5df3f4b1f 100644 --- a/apps/app-tilgang-analyse-service/build.gradle +++ b/apps/app-tilgang-analyse-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,8 +69,8 @@ dependencies { implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' @@ -79,4 +79,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties b/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/LocalConfig.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/LocalConfig.java index f62cc3e0bb3..07c4c2c8006 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/LocalConfig.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/config/LocalConfig.java @@ -8,12 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; @Configuration @Profile({"local", "localdb"}) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/Access.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/Access.java index 938c44818c6..575aeea7893 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/Access.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/Access.java @@ -5,7 +5,6 @@ import no.nav.testnav.apps.apptilganganalyseservice.dto.AccessDTO; import java.util.List; -import java.util.stream.Collectors; @Slf4j public class Access { @@ -19,19 +18,19 @@ public Access(String name, List applications, List application.getInbound().contains(name)) .map(application -> new Application(application, find(application, deploys))) - .collect(Collectors.toList()); + .toList(); this.accessFrom = applications .stream() .filter(application -> application.getOutbound().contains(name)) .map(application -> new Application(application, find(application, deploys))) - .collect(Collectors.toList()); + .toList(); } public AccessDTO toDTO() { return new AccessDTO( name, - accessTo.stream().map(Application::toDTO).collect(Collectors.toList()), - accessFrom.stream().map(Application::toDTO).collect(Collectors.toList()) + accessTo.stream().map(Application::toDTO).toList(), + accessFrom.stream().map(Application::toDTO).toList() ); } diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/ApplicationConfig.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/ApplicationConfig.java index ebe0926d8b0..915c4bb391c 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/ApplicationConfig.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/ApplicationConfig.java @@ -1,14 +1,14 @@ package no.nav.testnav.apps.apptilganganalyseservice.domain; -import java.util.Collections; -import java.util.List; -import java.util.stream.Collectors; - import no.nav.testnav.apps.apptilganganalyseservice.domain.yml.application.v1.AccessPolicy; import no.nav.testnav.apps.apptilganganalyseservice.domain.yml.application.v1.KindApplikasjon; import no.nav.testnav.apps.apptilganganalyseservice.domain.yml.application.v1.Rule; import no.nav.testnav.apps.apptilganganalyseservice.repository.entity.DocumentEntity; import no.nav.testnav.apps.apptilganganalyseservice.util.YAMLUtil; +import org.yaml.snakeyaml.error.YAMLException; + +import java.util.Collections; +import java.util.List; public class ApplicationConfig { private final KindApplikasjon kindApplikasjon; @@ -26,7 +26,7 @@ public ApplicationConfig(DocumentEntity entity) { KindApplikasjon.class ); } catch (Exception e) { - throw new RuntimeException("Klarer ikke å convertere til yaml. ( " + entity.getPath() + " )", e); + throw new YAMLException("Klarer ikke å convertere til yaml. ( " + entity.getPath() + " )", e); } } @@ -42,7 +42,7 @@ public List getInbound() { .getRules() .stream() .map(Rule::getApplication) - .collect(Collectors.toList()); + .toList(); } public List getOutbound() { @@ -57,17 +57,13 @@ public List getOutbound() { .getRules() .stream() .map(Rule::getApplication) - .collect(Collectors.toList()); + .toList(); } public String getPath() { return path; } - private AccessPolicy getAccessPolicy() { - return kindApplikasjon.getSpec().getAccessPolicy(); - } - public String getName() { return kindApplikasjon.getMetadata().getName(); } @@ -75,4 +71,8 @@ public String getName() { public String getNamespace() { return kindApplikasjon.getMetadata().getNamespace(); } + + private AccessPolicy getAccessPolicy() { + return kindApplikasjon.getSpec().getAccessPolicy(); + } } \ No newline at end of file diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/SearchResults.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/SearchResults.java index 986a9ac88d3..fecfd8f0cfd 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/SearchResults.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/domain/SearchResults.java @@ -28,7 +28,7 @@ public SearchResults(SearchDTO dto, String repo, String owner) { this.items = dto.getItems() .stream() .map(ItemResult::new) - .collect(Collectors.toList()); + .toList(); } public SearchResults concat(SearchResults results) { diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/dto/ApplicationDTO.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/dto/ApplicationDTO.java index 6037102e478..591637884fa 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/dto/ApplicationDTO.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/dto/ApplicationDTO.java @@ -3,7 +3,6 @@ import lombok.AllArgsConstructor; import lombok.Builder; import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; import lombok.Value; @Value diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/repository/DocumentReadConverter.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/repository/DocumentReadConverter.java index 08474e3da2c..d669c006920 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/repository/DocumentReadConverter.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/repository/DocumentReadConverter.java @@ -3,13 +3,12 @@ import io.r2dbc.spi.Clob; import io.r2dbc.spi.Row; -import org.springframework.core.convert.converter.Converter; -import org.springframework.data.convert.ReadingConverter; -import reactor.core.publisher.Flux; - import no.nav.testnav.apps.apptilganganalyseservice.domain.DocumentType; import no.nav.testnav.apps.apptilganganalyseservice.repository.entity.DocumentEntity; import no.nav.testnav.apps.apptilganganalyseservice.util.ThreadUtil; +import org.springframework.core.convert.converter.Converter; +import org.springframework.data.convert.ReadingConverter; +import reactor.core.publisher.Flux; @ReadingConverter public class DocumentReadConverter implements Converter { @@ -31,8 +30,8 @@ public DocumentEntity convert(Row row) { * TODO: Bruker en HACK for å hente ut stream av strings fra Flux. */ private static String toString(Row row, String name) { - if (row.get(name) instanceof String) { - return (String) row.get(name); + if (row.get(name) instanceof String string) { + return string; } var publisher = (Flux) ((Clob) row.get(name)).stream(); return String.join("", ThreadUtil.Instance().resolve(publisher)); diff --git a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/service/ReadConfigService.java b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/service/ReadConfigService.java index 0639a36ccaa..088ae1d5bbf 100644 --- a/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/service/ReadConfigService.java +++ b/apps/app-tilgang-analyse-service/src/main/java/no/nav/testnav/apps/apptilganganalyseservice/service/ReadConfigService.java @@ -1,17 +1,14 @@ package no.nav.testnav.apps.apptilganganalyseservice.service; import lombok.AllArgsConstructor; -import reactor.core.publisher.Flux; -import reactor.core.publisher.Mono; - -import java.util.stream.Collectors; - import no.nav.testnav.apps.apptilganganalyseservice.consumer.GithubConsumer; import no.nav.testnav.apps.apptilganganalyseservice.domain.DocumentType; import no.nav.testnav.apps.apptilganganalyseservice.domain.ItemResult; import no.nav.testnav.apps.apptilganganalyseservice.domain.SearchResults; import no.nav.testnav.apps.apptilganganalyseservice.repository.DocumentRepository; import no.nav.testnav.apps.apptilganganalyseservice.repository.entity.DocumentEntity; +import reactor.core.publisher.Flux; +import reactor.core.publisher.Mono; @AllArgsConstructor abstract class ReadConfigService { @@ -43,7 +40,7 @@ Flux resolve(SearchResults results) { results.getItems() .stream() .map(item -> fetchAndSave(item, results.getOwner(), results.getRepo())) - .collect(Collectors.toList()) + .toList() ); } diff --git a/apps/arbeidsforhold-export-api/build.gradle b/apps/arbeidsforhold-export-api/build.gradle index d439a91e217..3f656bec417 100644 --- a/apps/arbeidsforhold-export-api/build.gradle +++ b/apps/arbeidsforhold-export-api/build.gradle @@ -70,8 +70,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.apache.commons:commons-csv:1.10.0' implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.hibernate.validator:hibernate-validator' @@ -85,4 +85,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties b/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/DevVaultConfig.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/DevVaultConfig.java index d1c760a0e29..f499d14ef92 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/DevVaultConfig.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/DevVaultConfig.java @@ -8,12 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @VaultPropertySource(value = "kv/preprod/fss/testnorge-arbeidsforhold-export-api/dev", ignoreSecretNotFound = false) public class DevVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_0/Opplysningspliktig.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_0/Opplysningspliktig.java index 2c46b4b023e..441d5e39dfd 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_0/Opplysningspliktig.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_0/Opplysningspliktig.java @@ -1,24 +1,21 @@ package no.nav.no.registere.testnorge.arbeidsforholdexportapi.domain.v2_0; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; - import jakarta.xml.bind.JAXBContext; import jakarta.xml.bind.JAXBElement; import jakarta.xml.bind.JAXBException; import jakarta.xml.bind.Unmarshaller; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnorge.xsd.arbeidsforhold.v2_0.EDAGM; + import java.io.StringReader; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.stream.Collectors; - -import no.nav.registre.testnorge.xsd.arbeidsforhold.v2_0.EDAGM; @Slf4j @RequiredArgsConstructor public class Opplysningspliktig { - private final EDAGM edagm; private static Unmarshaller unmarshaller; static { @@ -30,23 +27,7 @@ public class Opplysningspliktig { } } - - @SuppressWarnings("unchecked") - private static EDAGM from(String xml, Unmarshaller unmarshaller) throws JAXBException { - try (var reader = new StringReader(xml)) { - EDAGM edagm = ((JAXBElement) unmarshaller.unmarshal(reader)).getValue(); - reader.close(); - return edagm; - } - } - - public static Opplysningspliktig from(String xml) { - try { - return new Opplysningspliktig(from(xml, unmarshaller)); - } catch (Exception e) { - throw new RuntimeException("Klarer ikke a konvertere xmlene til EDAGM", e); - } - } + private final EDAGM edagm; public List toAvvik() { var avviks = new ArrayList(); @@ -56,7 +37,7 @@ public List toAvvik() { .filter(Arbeidsforhold::hasAvvik) .map(Arbeidsforhold::getAvvikList) .flatMap(Collection::stream) - .collect(Collectors.toList()) + .toList() ); avviks.addAll( getPermisjoner() @@ -64,7 +45,7 @@ public List toAvvik() { .filter(Permisjon::hasAvvik) .map(Permisjon::getAvvikList) .flatMap(Collection::stream) - .collect(Collectors.toList()) + .toList() ); avviks.addAll( @@ -73,32 +54,46 @@ public List toAvvik() { .filter(Inntekt::hasAvvik) .map(Inntekt::getAvvikList) .flatMap(Collection::stream) - .collect(Collectors.toList()) + .toList() ); return avviks; } - private List getPermisjoner() { - return getArbeidsforhold() - .stream() - .map(Arbeidsforhold::getPermisjoner) - .flatMap(Collection::stream) - .collect(Collectors.toList()); - } - - public List toPermisjoner() { return getPermisjoner() .stream() .filter(value -> !value.hasAvvik()) - .collect(Collectors.toList()); + .toList(); } public List toArbeidsforhold() { return getArbeidsforhold() .stream() .filter(value -> !value.hasAvvik()) - .collect(Collectors.toList()); + .toList(); + } + + public List toInntekt() { + return getInntekter() + .stream() + .filter(value -> !value.hasAvvik()) + .toList(); + } + + public static Opplysningspliktig from(String xml) { + try { + return new Opplysningspliktig(from(xml, unmarshaller)); + } catch (Exception e) { + throw new RuntimeException("Klarer ikke a konvertere xmlene til EDAGM", e); + } + } + + private List getPermisjoner() { + return getArbeidsforhold() + .stream() + .map(Arbeidsforhold::getPermisjoner) + .flatMap(Collection::stream) + .toList(); } private List getArbeidsforhold() { @@ -113,13 +108,6 @@ private List getArbeidsforhold() { return arbeidsforholds; } - public List toInntekt() { - return getInntekter() - .stream() - .filter(value -> !value.hasAvvik()) - .collect(Collectors.toList()); - } - private List getInntekter() { List inntekts = new ArrayList<>(); var leveranse = this.edagm.getLeveranse(); @@ -131,4 +119,11 @@ private List getInntekter() { ); return inntekts; } + + @SuppressWarnings("unchecked") + private static EDAGM from(String xml, Unmarshaller unmarshaller) throws JAXBException { + try (var reader = new StringReader(xml)) { + return ((JAXBElement) unmarshaller.unmarshal(reader)).getValue(); + } + } } diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_1/Opplysningspliktig.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_1/Opplysningspliktig.java index 780e4bc4689..3e58a9c0a5a 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_1/Opplysningspliktig.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/domain/v2_1/Opplysningspliktig.java @@ -1,24 +1,21 @@ package no.nav.no.registere.testnorge.arbeidsforholdexportapi.domain.v2_1; -import lombok.RequiredArgsConstructor; -import lombok.extern.slf4j.Slf4j; - import jakarta.xml.bind.JAXBContext; import jakarta.xml.bind.JAXBElement; import jakarta.xml.bind.JAXBException; import jakarta.xml.bind.Unmarshaller; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnorge.xsd.arbeidsforhold.v2_1.EDAGM; + import java.io.StringReader; import java.util.ArrayList; import java.util.Collection; import java.util.List; -import java.util.stream.Collectors; - -import no.nav.registre.testnorge.xsd.arbeidsforhold.v2_1.EDAGM; @Slf4j @RequiredArgsConstructor public class Opplysningspliktig { - private final EDAGM edagm; private static Unmarshaller unmarshaller; static { @@ -30,23 +27,7 @@ public class Opplysningspliktig { } } - - @SuppressWarnings("unchecked") - private static EDAGM from(String xml, Unmarshaller unmarshaller) throws JAXBException { - try (var reader = new StringReader(xml)) { - EDAGM edagm = ((JAXBElement) unmarshaller.unmarshal(reader)).getValue(); - reader.close(); - return edagm; - } - } - - public static Opplysningspliktig from(String xml) { - try { - return new Opplysningspliktig(from(xml, unmarshaller)); - } catch (Exception e) { - throw new RuntimeException("Klarer ikke a konvertere xmlene til EDAGM", e); - } - } + private final EDAGM edagm; public List toAvvik() { var avviks = new ArrayList(); @@ -56,7 +37,7 @@ public List toAvvik() { .filter(Arbeidsforhold::hasAvvik) .map(Arbeidsforhold::getAvvikList) .flatMap(Collection::stream) - .collect(Collectors.toList()) + .toList() ); avviks.addAll( getPermisjoner() @@ -64,7 +45,7 @@ public List toAvvik() { .filter(Permisjon::hasAvvik) .map(Permisjon::getAvvikList) .flatMap(Collection::stream) - .collect(Collectors.toList()) + .toList() ); avviks.addAll( @@ -73,32 +54,46 @@ public List toAvvik() { .filter(Inntekt::hasAvvik) .map(Inntekt::getAvvikList) .flatMap(Collection::stream) - .collect(Collectors.toList()) + .toList() ); return avviks; } - private List getPermisjoner() { - return getArbeidsforhold() - .stream() - .map(Arbeidsforhold::getPermisjoner) - .flatMap(Collection::stream) - .collect(Collectors.toList()); - } - - public List toPermisjoner() { return getPermisjoner() .stream() .filter(value -> !value.hasAvvik()) - .collect(Collectors.toList()); + .toList(); } public List toArbeidsforhold() { return getArbeidsforhold() .stream() .filter(value -> !value.hasAvvik()) - .collect(Collectors.toList()); + .toList(); + } + + public List toInntekt() { + return getInntekter() + .stream() + .filter(value -> !value.hasAvvik()) + .toList(); + } + + public static Opplysningspliktig from(String xml) { + try { + return new Opplysningspliktig(from(xml, unmarshaller)); + } catch (Exception e) { + throw new RuntimeException("Klarer ikke a konvertere xmlene til EDAGM", e); + } + } + + private List getPermisjoner() { + return getArbeidsforhold() + .stream() + .map(Arbeidsforhold::getPermisjoner) + .flatMap(Collection::stream) + .toList(); } private List getArbeidsforhold() { @@ -113,13 +108,6 @@ private List getArbeidsforhold() { return arbeidsforholds; } - public List toInntekt() { - return getInntekter() - .stream() - .filter(value -> !value.hasAvvik()) - .collect(Collectors.toList()); - } - private List getInntekter() { List inntekts = new ArrayList<>(); var leveranse = this.edagm.getLeveranse(); @@ -131,4 +119,11 @@ private List getInntekter() { ); return inntekts; } + + @SuppressWarnings("unchecked") + private static EDAGM from(String xml, Unmarshaller unmarshaller) throws JAXBException { + try (var reader = new StringReader(xml)) { + return ((JAXBElement) unmarshaller.unmarshal(reader)).getValue(); + } + } } diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/ArbeidsforholdExportController.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/ArbeidsforholdExportController.java index a7913bcc379..27ec23ac24a 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/ArbeidsforholdExportController.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/ArbeidsforholdExportController.java @@ -2,21 +2,15 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.http.HttpHeaders; +import no.nav.no.registere.testnorge.arbeidsforholdexportapi.service.ArbeidsforholdExportService; import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; -import jakarta.servlet.http.HttpServletResponse; import java.io.IOException; import java.net.URI; -import java.nio.charset.StandardCharsets; -import java.time.LocalDateTime; - -import no.nav.no.registere.testnorge.arbeidsforholdexportapi.service.ArbeidsforholdExportService; @Slf4j @RestController diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/FileController.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/FileController.java index e52012ec553..ea7f0113b74 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/FileController.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/provider/FileController.java @@ -11,13 +11,11 @@ import org.springframework.web.bind.annotation.RestController; import java.io.IOException; -import java.net.MalformedURLException; import java.nio.file.Files; import java.nio.file.Path; import java.nio.file.Paths; import java.time.LocalDateTime; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.Stream; @Slf4j @@ -32,7 +30,7 @@ public ResponseEntity> getFiles() throws IOException { .filter(Files::isRegularFile) .map(value -> value.getFileName().toString()) .filter(value -> value.endsWith(".csv")) - .collect(Collectors.toList()) + .toList() ); } } diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/repository/InntektsmottakerHendelseRepository.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/repository/InntektsmottakerHendelseRepository.java index d8f9b18f5cc..b99406dbd09 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/repository/InntektsmottakerHendelseRepository.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/repository/InntektsmottakerHendelseRepository.java @@ -2,13 +2,6 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.jdbc.core.JdbcTemplate; -import org.springframework.stereotype.Repository; - -import java.util.Collection; -import java.util.List; -import java.util.stream.Collectors; - import no.nav.no.registere.testnorge.arbeidsforholdexportapi.domain.Arbeidsforhold; import no.nav.no.registere.testnorge.arbeidsforholdexportapi.domain.Avvik; import no.nav.no.registere.testnorge.arbeidsforholdexportapi.domain.Inntekt; @@ -17,6 +10,12 @@ import no.nav.no.registere.testnorge.arbeidsforholdexportapi.repository.mapper.InntektsmottakerXmlAvvikRowMapper; import no.nav.no.registere.testnorge.arbeidsforholdexportapi.repository.mapper.InntektsmottakerXmlInntekterRowMapper; import no.nav.no.registere.testnorge.arbeidsforholdexportapi.repository.mapper.InntektsmottakerXmlPermisjonerRowMapper; +import org.springframework.jdbc.core.JdbcTemplate; +import org.springframework.stereotype.Repository; + +import java.util.Collection; +import java.util.List; +import java.util.stream.Collectors; @Slf4j @Repository @@ -35,7 +34,7 @@ public List getArbeidsforhold(int page, int size) { log.info("Henter {} INNTEKTSMOTTAKER_XML fra DB...", size); List list = jdbcTemplate.query( "SELECT INNTEKTSMOTTAKER_XML FROM temp_uttrekk_inhe ORDER BY EFF_OPPLYSNINGSPLIKTIG_ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", - new Object[]{ page * size, size}, + new Object[]{ page * size, size }, new InntektsmottakerXmlArbeidsforholdRowMapper(page * size, count()) ).stream().flatMap(Collection::stream).collect(Collectors.toList()); log.info("Hentet {} INNTEKTSMOTTAKER_XML med {} arbeidsforhold fra DB.", size, list.size()); @@ -46,7 +45,7 @@ public List getPermisjoner(int page, int size) { log.info("Henter {} INNTEKTSMOTTAKER_XML fra DB...", size); List list = jdbcTemplate.query( "SELECT INNTEKTSMOTTAKER_XML FROM temp_uttrekk_inhe ORDER BY EFF_OPPLYSNINGSPLIKTIG_ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", - new Object[]{ page * size, size}, + new Object[]{ page * size, size }, new InntektsmottakerXmlPermisjonerRowMapper(page * size, count()) ).stream().flatMap(Collection::stream).collect(Collectors.toList()); log.info("Hentet {} INNTEKTSMOTTAKER_XML med {} permisjoner fra DB.", size, list.size()); @@ -57,7 +56,7 @@ public List getInntekter(int page, int size) { log.info("Henter {} INNTEKTSMOTTAKER_XML fra DB...", size); List list = jdbcTemplate.query( "SELECT INNTEKTSMOTTAKER_XML FROM temp_uttrekk_inhe ORDER BY EFF_OPPLYSNINGSPLIKTIG_ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", - new Object[]{ page * size, size}, + new Object[]{ page * size, size }, new InntektsmottakerXmlInntekterRowMapper(page * size, count()) ).stream().flatMap(Collection::stream).collect(Collectors.toList()); log.info("Hentet {} INNTEKTSMOTTAKER_XML med {} inntekter fra DB.", size, list.size()); @@ -67,10 +66,11 @@ public List getInntekter(int page, int size) { public List getAvvik(int page, int size) { log.info("Henter {} INNTEKTSMOTTAKER_XML fra DB...", size); List list = jdbcTemplate.query( - "SELECT INNTEKTSMOTTAKER_XML FROM temp_uttrekk_inhe ORDER BY EFF_OPPLYSNINGSPLIKTIG_ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", - new Object[]{ page * size, size}, - new InntektsmottakerXmlAvvikRowMapper(page * size, count()) - ).stream().flatMap(Collection::stream).collect(Collectors.toList()); + "SELECT INNTEKTSMOTTAKER_XML FROM temp_uttrekk_inhe ORDER BY EFF_OPPLYSNINGSPLIKTIG_ID OFFSET ? ROWS FETCH NEXT ? ROWS ONLY", + new Object[]{ page * size, size }, + new InntektsmottakerXmlAvvikRowMapper(page * size, count()) + ).stream().flatMap(Collection::stream) + .collect(Collectors.toList()); log.info("Hentet {} INNTEKTSMOTTAKER_XML med {} inntekter fra DB.", size, list.size()); return list; } diff --git a/apps/arbeidsforhold-service/build.gradle b/apps/arbeidsforhold-service/build.gradle index 37655a753fd..a73f707fa7e 100644 --- a/apps/arbeidsforhold-service/build.gradle +++ b/apps/arbeidsforhold-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -58,7 +58,7 @@ dependencies { } implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' - implementation 'javax.activation:activation:1.1' + implementation 'javax.activation:activation:1.1.1' implementation 'org.glassfish.jaxb:jaxb-runtime' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' @@ -80,8 +80,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'javax.annotation:javax.annotation-api:1.3.2' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' @@ -94,4 +94,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties b/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/DevConfig.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/DevConfig.java index 666fac61298..fa7435b7d60 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/DevConfig.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/consumer/AaregConsumer.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/consumer/AaregConsumer.java index b3296fbe8ef..9e44ddd8680 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/consumer/AaregConsumer.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/consumer/AaregConsumer.java @@ -18,7 +18,6 @@ import java.util.List; import java.util.Objects; import java.util.Optional; -import java.util.stream.Collectors; import static java.util.Objects.nonNull; @@ -66,7 +65,7 @@ private List getArbeidsforholds(String ident, String orgnumme .stream() .filter(Objects::nonNull) .filter(value -> value.getArbeidsgiver().getOrganisasjonsnummer().equals(orgnummer)) - .collect(Collectors.toList()); + .toList(); } public Optional getArbeidsforhold(String ident, String orgnummer, String arbeidsforholdId, String miljo) { diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/domain/Arbeidsforhold.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/domain/Arbeidsforhold.java index 0270df5762c..8ba86f48acc 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/domain/Arbeidsforhold.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/domain/Arbeidsforhold.java @@ -5,15 +5,13 @@ import no.nav.registre.testnorge.arbeidsforholdservice.consumer.dto.ArbeidsforholdDTO; import no.nav.registre.testnorge.arbeidsforholdservice.exception.ArbeidsforholdNotFoundException; -import java.util.stream.Collectors; - @Slf4j @AllArgsConstructor public class Arbeidsforhold { private final ArbeidsforholdDTO dto; - public no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v1.ArbeidsforholdDTO toV1DTO() { + public no.nav.testnav.libs.dto.oppsummeringsdokumentservice.v1.ArbeidsforholdDTO toV1DTO() { if (dto.getArbeidsavtaler().isEmpty()) { throw new ArbeidsforholdNotFoundException("Finner ikke arbeidsforhold"); @@ -50,7 +48,7 @@ public no.nav.registre.testnorge.arbeidsforholdservice.provider.v2.dto.Arbeidsfo .stream() .map(AntallTimerForTimeloennet::new) .map(AntallTimerForTimeloennet::toDTO) - .collect(Collectors.toList()); + .toList(); var utenlandsopphold = dto.getUtenlandsopphold() == null ? null : @@ -58,7 +56,7 @@ public no.nav.registre.testnorge.arbeidsforholdservice.provider.v2.dto.Arbeidsfo .stream() .map(Utenlandsopphold::new) .map(Utenlandsopphold::toDTO) - .collect(Collectors.toList()); + .toList(); var permisjoner = dto.getPermisjonPermitteringer() == null ? null : @@ -66,7 +64,7 @@ public no.nav.registre.testnorge.arbeidsforholdservice.provider.v2.dto.Arbeidsfo .stream() .map(Permisjon::new) .map(Permisjon::toDTO) - .collect(Collectors.toList()); + .toList(); return no.nav.registre.testnorge.arbeidsforholdservice.provider.v2.dto.ArbeidsforholdDTO .builder() @@ -75,7 +73,8 @@ public no.nav.registre.testnorge.arbeidsforholdservice.provider.v2.dto.Arbeidsfo .antallTimerForTimeloennet(antallImerForTimeloennetList) .arbeidsgiver(new Arbeidsgiver(dto.getArbeidsgiver()).toDTO()) .ansettelsesperiode(new Ansettelsesperiode(dto.getAnsettelsesperiode()).toDTO()) - .arbeidsavtaler(dto.getArbeidsavtaler().stream().map(Arbeidsavtale::new).map(Arbeidsavtale::toDTO).collect(Collectors.toList())) + .arbeidsavtaler(dto.getArbeidsavtaler().stream().map(Arbeidsavtale::new).map(Arbeidsavtale::toDTO) + .toList()) .fartoy(dto.getArbeidsavtaler().get(0).getSkipstype() == null ? null : new Fartoy(dto.getArbeidsavtaler().get(0)).toDTO()) .arbeidstaker(new Arbeidstaker(dto.getArbeidstaker()).toDTO()) .utenlandsopphold(utenlandsopphold) diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/provider/v2/ArbeidstakerController.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/provider/v2/ArbeidstakerController.java index 03c7a1926b4..43dc23dc9ea 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/provider/v2/ArbeidstakerController.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/provider/v2/ArbeidstakerController.java @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; -import java.util.stream.Collectors; @RestController @Slf4j @@ -35,6 +34,7 @@ public ResponseEntity> getArbeidsforhold( return ResponseEntity.notFound().build(); } - return ResponseEntity.ok(arbeidsforhold.stream().map(Arbeidsforhold::toV2DTO).collect(Collectors.toList())); + return ResponseEntity.ok(arbeidsforhold.stream().map(Arbeidsforhold::toV2DTO) + .toList()); } } diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/service/ArbeidsforholdService.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/service/ArbeidsforholdService.java index 57f56506a81..6f0cc18a60b 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/service/ArbeidsforholdService.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/service/ArbeidsforholdService.java @@ -9,7 +9,6 @@ import java.util.List; import java.util.Optional; -import java.util.stream.Collectors; @Slf4j @Service @@ -23,7 +22,7 @@ public List getArbeidsforhold(String ident, String miljo) { return arbeidsforhold == null ? null : arbeidsforhold .stream() .map(Arbeidsforhold::new) - .collect(Collectors.toList()); + .toList(); } diff --git a/apps/batch-bestilling-service/build.gradle b/apps/batch-bestilling-service/build.gradle index 802ad45e358..279824d160a 100644 --- a/apps/batch-bestilling-service/build.gradle +++ b/apps/batch-bestilling-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,8 +67,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -80,4 +80,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties b/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java index e3c4569eb70..6502c44e606 100644 --- a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java +++ b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/DevConfig.java @@ -16,6 +16,8 @@ @VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -24,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); + var token = System.getProperty(VAULT_TOKEN); if (isBlank(token)) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/request/RsDollyBestillingRequest.java b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/request/RsDollyBestillingRequest.java index 43777c5b813..9951cb6ed9c 100644 --- a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/request/RsDollyBestillingRequest.java +++ b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/request/RsDollyBestillingRequest.java @@ -13,7 +13,7 @@ public class RsDollyBestillingRequest extends RsDollyUtvidetBestilling { @Schema( - required = true, + requiredMode = Schema.RequiredMode.REQUIRED, description = "Antall testpersoner som bestilles" ) private int antall; diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index 0334f255857..eb48df53816 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -103,12 +103,12 @@ dependencies { implementation 'org.flywaydb:flyway-core' implementation 'com.h2database:h2' - implementation 'org.apache.cxf:cxf-rt-frontend-jaxws:3.4.5' + implementation 'org.apache.cxf:cxf-rt-frontend-jaxws:3.5.5' implementation 'wsdl4j:wsdl4j:1.6.3' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' implementation 'javax.validation:validation-api:2.0.1.Final' - implementation 'org.springdoc:springdoc-openapi-ui:1.6.9' + implementation 'org.springdoc:springdoc-openapi-ui:1.6.15' implementation 'no.nav.common:cxf:2.2021.11.10_07.34-c6f02734d4ab' implementation 'com.h2database:h2' implementation 'jakarta.jws:jakarta.jws-api:3.0.0' @@ -121,4 +121,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties b/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties +++ b/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/brreg-stub/src/main/java/no/nav/brregstub/config/DevVaultConfig.java b/apps/brreg-stub/src/main/java/no/nav/brregstub/config/DevVaultConfig.java index d04e4a621f6..fb4a67263c3 100644 --- a/apps/brreg-stub/src/main/java/no/nav/brregstub/config/DevVaultConfig.java +++ b/apps/brreg-stub/src/main/java/no/nav/brregstub/config/DevVaultConfig.java @@ -8,6 +8,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static net.logstash.logback.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "kv/preprod/fss/brreg-stub/local", ignoreSecretNotFound = false) @@ -21,8 +23,8 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); } diff --git a/apps/brreg-stub/src/main/java/no/nav/brregstub/mapper/HentRolleMapper.java b/apps/brreg-stub/src/main/java/no/nav/brregstub/mapper/HentRolleMapper.java index 3a45f6c1c1f..d2940204e80 100644 --- a/apps/brreg-stub/src/main/java/no/nav/brregstub/mapper/HentRolleMapper.java +++ b/apps/brreg-stub/src/main/java/no/nav/brregstub/mapper/HentRolleMapper.java @@ -1,14 +1,6 @@ package no.nav.brregstub.mapper; -import static java.time.format.DateTimeFormatter.ISO_DATE; -import static no.nav.brregstub.api.common.UnderstatusKode.understatusKoder; - import lombok.SneakyThrows; - -import javax.xml.datatype.DatatypeFactory; -import javax.xml.datatype.XMLGregorianCalendar; -import java.time.LocalDate; - import no.nav.brregstub.api.common.RolleKode; import no.nav.brregstub.api.common.RsOrganisasjon; import no.nav.brregstub.api.common.RsPersonOgRolle; @@ -19,6 +11,13 @@ import no.nav.brregstub.tjenestekontrakter.hentroller.Grunndata.ResponseHeader; import no.nav.brregstub.tjenestekontrakter.hentroller.Grunndata.ResponseHeader.UnderStatus.UnderStatusMelding; +import javax.xml.datatype.DatatypeFactory; +import javax.xml.datatype.XMLGregorianCalendar; +import java.time.LocalDate; + +import static java.time.format.DateTimeFormatter.ISO_DATE; +import static no.nav.brregstub.api.common.UnderstatusKode.understatusKoder; + public class HentRolleMapper { public static final String TJENESTE_NAVN = "hentRoller"; @@ -115,7 +114,7 @@ private static Samendring mapTilSamendring( RsSamendring rsSamendring, RolleKode rolleKode ) { - if (rsSamendring.getRoller().size() > 0) { + if (!rsSamendring.getRoller().isEmpty()) { var samendring = new Samendring(); samendring.setSamendringstype(rolleKode.name()); samendring.setBeskrivelse(rolleKode.getBeskrivelse()); diff --git a/apps/brreg-stub/src/main/java/no/nav/brregstub/ws/BrregEndpoint.java b/apps/brreg-stub/src/main/java/no/nav/brregstub/ws/BrregEndpoint.java index 743c7d5176c..5ab00a904b1 100644 --- a/apps/brreg-stub/src/main/java/no/nav/brregstub/ws/BrregEndpoint.java +++ b/apps/brreg-stub/src/main/java/no/nav/brregstub/ws/BrregEndpoint.java @@ -42,9 +42,9 @@ public JAXBElement hentRollerResponse( var response = new HentRollerResponse(); response.setReturn(konverterGrunndataTilString(brregService.hentRoller(request.getValue().getOrgnr()))); - return new JAXBElement<>(new QName("http://no/brreg/saksys/grunndata/ws", "hentRollerResponse"), - HentRollerResponse.class, - response); + return new JAXBElement<>(new QName(NAMESPACE_URI, "hentRollerResponse"), + HentRollerResponse.class, + response); } catch (Exception e) { LOGGER.error("Ukjent feil ved kall av hentRoller", e); throw new RuntimeException("Ukjent feil ved kall av hentRoller: " + e.getMessage()); @@ -60,8 +60,8 @@ public JAXBElement hentRolleutskrift( var response = new HentRolleutskriftResponse(); response.setReturn(konverterGrunndataTilString(brregService.hentRolleutskrift(request.getValue().getRequestId()))); return new JAXBElement<>(new QName("http://no/brreg/saksys/grunndata/ws", "hentRolleutskriftResponse"), - HentRolleutskriftResponse.class, - response); + HentRolleutskriftResponse.class, + response); } catch (Exception e) { LOGGER.error("Ukjent feil ved kall av hentRolleutskrift", e); throw new RuntimeException("Ukjent feil ved kall av hentRoller: " + e.getMessage()); diff --git a/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v1/KodeControllerTest.java b/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v1/KodeControllerTest.java index a5bc9b50697..01237f092ea 100644 --- a/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v1/KodeControllerTest.java +++ b/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v1/KodeControllerTest.java @@ -21,7 +21,7 @@ @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @ExtendWith(SpringExtension.class) @TestInstance(TestInstance.Lifecycle.PER_CLASS) -public class KodeControllerTest { +class KodeControllerTest { @Autowired protected TestRestTemplate restTemplate; @@ -29,7 +29,7 @@ public class KodeControllerTest { @Test @DisplayName("GET kode/roller returnerer 200 og rollene") - public void skalHenteRollelist() { + void skalHenteRollelist() { var response = restTemplate.getForEntity("/api/v1/kode/roller", Map.class); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(response.getBody()).isNotEmpty(); @@ -39,7 +39,7 @@ public void skalHenteRollelist() { @Test @DisplayName("GET kode/understatus returnerer 200 og tilgjenglige understatuser") - public void skalHenteUnderstatuser() { + void skalHenteUnderstatuser() { var response = restTemplate.getForEntity("/api/v1/kode/understatus", Map.class); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.OK); assertThat(response.getBody()).isNotEmpty(); diff --git a/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v2/RolleoversiktControllerTest.java b/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v2/RolleoversiktControllerTest.java index e01da9617e4..ae496d1f49c 100644 --- a/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v2/RolleoversiktControllerTest.java +++ b/apps/brreg-stub/src/test/java/no/nav/brregstub/endpoint/rs/v2/RolleoversiktControllerTest.java @@ -52,7 +52,7 @@ public class RolleoversiktControllerTest { @Test @DisplayName("GET rolleoversikt returnerer 404 hvis ikke eksisterer") - public void skalKasteNotFoundHvisRolleIkkeEksister() { + void skalKasteNotFoundHvisRolleIkkeEksister() { var response = restTemplate.exchange(API_V_2_ROLLEUTSKRIFT, HttpMethod.GET, createHttpEntity("eksister ikke", null), @@ -62,14 +62,14 @@ public void skalKasteNotFoundHvisRolleIkkeEksister() { @Test @DisplayName("GET rolleoversikt returnerer 400 hvis input mangler") - public void skalKasteBadRequestHvisInputMangler() { + void skalKasteBadRequestHvisInputMangler() { var response = restTemplate.getForEntity(API_V_2_ROLLEUTSKRIFT, Map.class); assertThat(response.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); } @Test @DisplayName("GET rolleoversikt returnerer 200 hvis ikke eksisterer") - public void skalHenteRolleutskriftFraDatabase() { + void skalHenteRolleutskriftFraDatabase() { var fnr = "03030303030"; var nyRolle = new Rolleoversikt(); nyRolle.setIdent(fnr); @@ -86,7 +86,7 @@ public void skalHenteRolleutskriftFraDatabase() { @Test @DisplayName("DELETE rolleoversikt skal slette rolleoversikt") - public void skalSletteRolleutskrift() { + void skalSletteRolleutskrift() { var nyRolle = new Rolleoversikt(); nyRolle.setIdent("slettes"); nyRolle.setJson("{\"fnr\":\"slettes\"}"); @@ -105,7 +105,7 @@ public void skalSletteRolleutskrift() { @Test @DisplayName("DELETE rolleoversikt returnerer 400 hvis input mangler") - public void deleteSkalKasteBadRequestHvisInputMangler() { + void deleteSkalKasteBadRequestHvisInputMangler() { var responseDelete = restTemplate.exchange(API_V_2_ROLLEUTSKRIFT, HttpMethod.DELETE, null, Map.class); assertThat(responseDelete.getStatusCode()).isEqualTo(HttpStatus.BAD_REQUEST); @@ -113,7 +113,7 @@ public void deleteSkalKasteBadRequestHvisInputMangler() { @Test @DisplayName("POST rolleoversikt skal opprette ny rolleoversikt") - public void skalLagreRequestIDatabase() { + void skalLagreRequestIDatabase() { var fnr = "01010101010"; var orgnummer = 99112345; var rsRolleoversikt = lagGyldigRsRolleoversikt(fnr, orgnummer); @@ -126,7 +126,7 @@ public void skalLagreRequestIDatabase() { @Test @DisplayName("POST rolleoversikt skal returnere bad request ved mangle input") - public void skalReturnereBadRequestVedPost() { + void skalReturnereBadRequestVedPost() { var fnr = "01010101010"; var rsRolleoversikt = new RsRolleoversikt(); diff --git a/apps/brreg-stub/src/test/java/no/nav/brregstub/service/BrregServiceTest.java b/apps/brreg-stub/src/test/java/no/nav/brregstub/service/BrregServiceTest.java index ec2d4166de8..49e09f830d5 100644 --- a/apps/brreg-stub/src/test/java/no/nav/brregstub/service/BrregServiceTest.java +++ b/apps/brreg-stub/src/test/java/no/nav/brregstub/service/BrregServiceTest.java @@ -78,7 +78,7 @@ public void hentRollerForOrganisasjon() { //assert responseheader assertThat(grunndata.getResponseHeader()).isNotNull(); - assertThat(grunndata.getResponseHeader().getHovedStatus()).isEqualTo(0); + assertThat(grunndata.getResponseHeader().getHovedStatus()).isZero(); assertThat(grunndata.getResponseHeader().getOrgnr()).isEqualTo(ORGNR); assertThat(grunndata.getResponseHeader().getTjeneste()).isEqualTo("hentRoller"); assertThat(grunndata.getResponseHeader() @@ -242,7 +242,7 @@ public void hentRolleutskriftForPersonResponseHeader() { //assert responseheader assertThat(grunndata.getResponseHeader()).isNotNull(); - assertThat(grunndata.getResponseHeader().getHovedStatus()).isEqualTo(0); + assertThat(grunndata.getResponseHeader().getHovedStatus()).isZero(); assertThat(grunndata.getResponseHeader().getFodselsnr()).isEqualTo(FNR); assertThat(grunndata.getResponseHeader().getTjeneste()).isEqualTo("hentRolleutskrift"); assertThat(grunndata.getResponseHeader() diff --git a/apps/bruker-service/build.gradle b/apps/bruker-service/build.gradle index 5beb638075c..b16bfa274ef 100644 --- a/apps/bruker-service/build.gradle +++ b/apps/bruker-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -48,7 +48,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -75,8 +75,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -100,4 +100,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties b/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/JacksonConfig.java b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/JacksonConfig.java index 31907c74806..9d06fce384c 100644 --- a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/JacksonConfig.java +++ b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/JacksonConfig.java @@ -14,6 +14,7 @@ public class JacksonConfig implements WebFluxConfigurer { private final ObjectMapper objectMapper; + @Override public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) { configurer.defaultCodecs().jackson2JsonEncoder( new Jackson2JsonEncoder(objectMapper) diff --git a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/LocalConfig.java b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/LocalConfig.java index f5c924f94e8..d6d921e3f60 100644 --- a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/LocalConfig.java +++ b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/config/LocalConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/repository/UserEntity.java b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/repository/UserEntity.java index 169949e0a8c..3a70cfec42d 100644 --- a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/repository/UserEntity.java +++ b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/repository/UserEntity.java @@ -3,7 +3,6 @@ import lombok.Data; import org.springframework.data.annotation.CreatedDate; import org.springframework.data.annotation.Id; -import org.springframework.data.annotation.LastModifiedDate; import org.springframework.data.annotation.Transient; import org.springframework.data.domain.Persistable; import org.springframework.data.relational.core.mapping.Column; diff --git a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/service/UserService.java b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/service/UserService.java index 6330f0c2e20..e9a84b33b1c 100644 --- a/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/service/UserService.java +++ b/apps/bruker-service/src/main/java/no/nav/testnav/apps/brukerservice/service/UserService.java @@ -1,17 +1,16 @@ package no.nav.testnav.apps.brukerservice.service; import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Service; -import reactor.core.publisher.Mono; - -import java.time.LocalDateTime; - import no.nav.testnav.apps.brukerservice.domain.User; import no.nav.testnav.apps.brukerservice.exception.UserAlreadyExistsException; import no.nav.testnav.apps.brukerservice.exception.UsernameAlreadyTakenException; import no.nav.testnav.apps.brukerservice.repository.UserEntity; import no.nav.testnav.apps.brukerservice.repository.UserRepository; import no.nav.testnav.libs.reactivesecurity.action.GetAuthenticatedUserId; +import org.springframework.stereotype.Service; +import reactor.core.publisher.Mono; + +import java.time.LocalDateTime; @Service @RequiredArgsConstructor @@ -37,7 +36,7 @@ public Mono create(String username, String representing) { } - public Mono getUserFromOrganisasjonsnummer(String organisasjonsnummer){ + public Mono getUserFromOrganisasjonsnummer(String organisasjonsnummer) { return getAuthenticatedUserId .call() .map(userId -> cryptographyService.createId(userId, organisasjonsnummer)) @@ -82,7 +81,7 @@ public Mono delete(String id) { private Mono validateUpdateUser(String username) { return repository.existsByBrukernavn(username) .doOnNext(exists -> { - if (exists) { + if (Boolean.TRUE.equals(exists)) { throw new UsernameAlreadyTakenException(username); } }) @@ -93,13 +92,13 @@ private Mono validateCreateUser(String userId, String username, String rep var id = cryptographyService.createId(userId, representing); return repository.existsById(id) .doOnNext(exists -> { - if (exists) { + if (Boolean.TRUE.equals(exists)) { throw new UserAlreadyExistsException(id); } }) .flatMap(ignored -> repository.existsByBrukernavn(username)) .doOnNext(exists -> { - if (exists) { + if (Boolean.TRUE.equals(exists)) { throw new UsernameAlreadyTakenException(username); } }) diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 36d7996c222..9863f70a3cf 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -41,7 +41,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -61,7 +61,7 @@ repositories { dependencies { - implementation platform('org.testcontainers:testcontainers-bom:1.17.6') + implementation platform('org.testcontainers:testcontainers-bom:1.19.1') implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' @@ -75,8 +75,8 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-webflux' @@ -93,7 +93,7 @@ dependencies { implementation 'com.github.ben-manes.caffeine:caffeine' implementation 'org.ehcache:ehcache:3.10.8' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2' implementation 'org.postgresql:postgresql' implementation 'org.flywaydb:flyway-core' implementation 'io.micrometer:micrometer-registry-prometheus' @@ -109,7 +109,7 @@ dependencies { testImplementation 'io.projectreactor:reactor-test:3.5.3' testImplementation 'org.testcontainers:junit-jupiter' testImplementation 'org.testcontainers:postgresql' - testImplementation 'org.bitbucket.b_c:jose4j:0.9.1' + testImplementation 'org.bitbucket.b_c:jose4j:0.9.3' implementation 'net.java.dev.jna:jna:5.13.0' implementation 'org.projectlombok:lombok' diff --git a/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties b/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties index c30b486a892..f66d1f62fff 100644 --- a/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/mapper/TpsMessagingMappingStrategy.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/mapper/TpsMessagingMappingStrategy.java index eb3b9469b7a..e53070ec702 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/mapper/TpsMessagingMappingStrategy.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/tpsmessagingservice/mapper/TpsMessagingMappingStrategy.java @@ -34,10 +34,7 @@ public void mapAtoB(TelefonnummerDTO kilde, no.nav.testnav.libs.dto.tpsmessaging destinasjon.setTelefonnummer(kilde.getNummer()); destinasjon.setLandkode(kilde.getLandskode()); - destinasjon.setTelefontype(switch (kilde.getPrioritet()) { - case 1 -> TypeTelefon.MOBI; - default -> TypeTelefon.HJET; - }); + destinasjon.setTelefontype(kilde.getPrioritet().equals(1) ? TypeTelefon.MOBI : TypeTelefon.HJET); } }) .register(); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java index c966b5f51b8..caf19339a54 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/LocalConfig.java @@ -12,6 +12,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static org.apache.commons.lang3.StringUtils.isBlank; + @Configuration @Profile("local") @Import({ FlywayConfiguration.class, @@ -33,7 +35,7 @@ public ClientAuthentication clientAuthentication() { System.setProperty(TOKEN, System.getenv("VAULT_TOKEN")); } var token = System.getProperty(TOKEN); - if (token == null) { + if (isBlank(token)) { throw new IllegalArgumentException(String.format("Påkrevd property '%s' er ikke satt.", TOKEN)); } return new TokenAuthentication(System.getProperty(TOKEN)); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateDeserializer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateDeserializer.java deleted file mode 100644 index c0e55409a69..00000000000 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/resultset/aareg/util/JsonDateDeserializer.java +++ /dev/null @@ -1,15 +0,0 @@ -package no.nav.dolly.domain.resultset.aareg.util; - -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; - -import java.io.IOException; -import java.time.LocalDateTime; - -public class JsonDateDeserializer extends JsonDeserializer { - - @Override public LocalDateTime deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException { - return LocalDateTime.parse(jp.getValueAsString()); - } -} \ No newline at end of file diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/aareg/util/AaaregUtilityTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/aareg/util/AaaregUtilityTest.java index eeb6be2ce5b..c0b80334a9f 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/aareg/util/AaaregUtilityTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/bestilling/aareg/util/AaaregUtilityTest.java @@ -36,10 +36,10 @@ private static Arbeidsforhold getArbeidsforhold(String arbeidsforholdId, Boolean } @ParameterizedTest - @CsvSource({"1, false, 1, 0, 1", + @CsvSource({ "1, false, 1, 0, 1", "1, true, 1, 1, 0", "2, false, 1, 0, 1", - "2, true, 1, 1, 0"}) + "2, true, 1, 1, 0" }) void arbeidsforholdEksistens_eksisterIkke(String reqArbForholdId, Boolean isOppdatering, String respArbForholdId, int antallEksisterende, int antallNye) { diff --git a/apps/dolly-frontend/build.gradle b/apps/dolly-frontend/build.gradle index 5058312391d..a7ece84a8b4 100644 --- a/apps/dolly-frontend/build.gradle +++ b/apps/dolly-frontend/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java' - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' mavenBom 'org.springframework.session:spring-session-bom:2021.2.0' } @@ -56,7 +56,7 @@ configurations { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java index 53a4e6d0bac..83a459d8f77 100644 --- a/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java +++ b/apps/dolly-frontend/src/main/java/no/nav/dolly/web/config/LocalVaultConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,13 +26,13 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/dollystatus/build.gradle b/apps/dollystatus/build.gradle index 11034d5b93b..74447886787 100644 --- a/apps/dollystatus/build.gradle +++ b/apps/dollystatus/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -46,4 +46,4 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties b/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/endringsmelding-frontend/build.gradle b/apps/endringsmelding-frontend/build.gradle index b39efd4fd98..33162310b22 100644 --- a/apps/endringsmelding-frontend/build.gradle +++ b/apps/endringsmelding-frontend/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -88,4 +88,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/DevConfig.java b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/DevConfig.java index 049a68d1764..f415f49068d 100644 --- a/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/DevConfig.java +++ b/apps/endringsmelding-frontend/src/main/java/no/nav/testnav/apps/endringsmeldingfrontend/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/endringsmelding-service/build.gradle b/apps/endringsmelding-service/build.gradle index bcb9e4dfe10..a4e4f110887 100644 --- a/apps/endringsmelding-service/build.gradle +++ b/apps/endringsmelding-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -32,7 +32,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -50,15 +50,15 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - + implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -68,4 +68,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/DevConfig.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/DevConfig.java index 83057ee5f35..0d320e77063 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/DevConfig.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/JacksonConfig.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/JacksonConfig.java index 2d3fc560e3d..c17807a47e7 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/JacksonConfig.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/config/JacksonConfig.java @@ -14,6 +14,7 @@ public class JacksonConfig implements WebFluxConfigurer { private final ObjectMapper objectMapper; + @Override public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) { configurer.defaultCodecs().jackson2JsonEncoder( new Jackson2JsonEncoder(objectMapper) diff --git a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/Status.java b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/Status.java index e5a042dae2b..ecaf0ed0077 100644 --- a/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/Status.java +++ b/apps/endringsmelding-service/src/main/java/no/nav/testnav/endringsmeldingservice/domain/Status.java @@ -1,10 +1,9 @@ package no.nav.testnav.endringsmeldingservice.domain; -import java.util.List; -import java.util.stream.Collectors; - import no.nav.testnav.endringsmeldingservice.consumer.response.EndringsmeldingResponse; +import java.util.List; + public class Status { private final String personId; private final List errors; @@ -16,7 +15,7 @@ public Status(EndringsmeldingResponse endringsmeldingResponse) { .values() .stream() .filter(value -> !value.equals("OK")) - .collect(Collectors.toList()); + .toList(); } public List getErrors() { diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index 93cff9aea0e..a3572480a1c 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -65,8 +65,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -79,4 +79,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties b/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/DevConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/DevConfig.java index f0b0aa0fcbe..74dd873bb54 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/DevConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/faste-data-frontend/build.gradle b/apps/faste-data-frontend/build.gradle index 47974aab84c..0d8011b5754 100644 --- a/apps/faste-data-frontend/build.gradle +++ b/apps/faste-data-frontend/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -88,4 +88,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/DevConfig.java b/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/DevConfig.java index 0b927d11d6b..c672dc1e64c 100644 --- a/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/DevConfig.java +++ b/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/controller/ForwardAndRedirectController.java b/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/controller/ForwardAndRedirectController.java index 7b4b464a5b8..db2ed43eaff 100644 --- a/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/controller/ForwardAndRedirectController.java +++ b/apps/faste-data-frontend/src/main/java/no/nav/testnav/apps/fastedatafrontend/controller/ForwardAndRedirectController.java @@ -1,7 +1,5 @@ package no.nav.testnav.apps.fastedatafrontend.controller; -import static org.springframework.web.reactive.function.server.ServerResponse.ok; - import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.Bean; import org.springframework.core.io.Resource; @@ -13,12 +11,14 @@ import org.springframework.web.reactive.function.server.RouterFunctions; import org.springframework.web.reactive.function.server.ServerResponse; +import static org.springframework.web.reactive.function.server.ServerResponse.ok; + @Controller public class ForwardAndRedirectController { @Bean public RouterFunction htmlRouter(@Value("classpath:/static/index.html") Resource html) { - HandlerFunction indexHandler = request -> ok().contentType(MediaType.TEXT_HTML).syncBody(html); + HandlerFunction indexHandler = request -> ok().contentType(MediaType.TEXT_HTML).bodyValue(html); return RouterFunctions .route(RequestPredicates.GET("/organisasjon/**"), indexHandler) .andRoute(RequestPredicates.GET("/person/**"), indexHandler); diff --git a/apps/generer-arbeidsforhold-populasjon-service/build.gradle b/apps/generer-arbeidsforhold-populasjon-service/build.gradle index 2e84845441e..de6adde886d 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/build.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -66,8 +66,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -77,4 +77,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/DevConfig.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/DevConfig.java index 875070b117e..116bb99010c 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/DevConfig.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/DevConfig.java @@ -8,10 +8,14 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -public class DevConfig extends AbstractVaultConfiguration { +public class DevConfig extends AbstractVaultConfiguration { + + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override public VaultEndpoint vaultEndpoint() { @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/controller/GenererArbeidsforholdController.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/controller/GenererArbeidsforholdController.java index 0245da43696..d9f0102d1c5 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/controller/GenererArbeidsforholdController.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/controller/GenererArbeidsforholdController.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.service.OrkestratorService; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestHeader; @@ -10,9 +11,6 @@ import org.springframework.web.bind.annotation.RestController; import java.time.LocalDate; -import java.util.List; - -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.service.OrkestratorService; @Slf4j @RestController diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Organisajon.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Organisajon.java index 7883636733a..4d9abe3db9a 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Organisajon.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Organisajon.java @@ -1,10 +1,10 @@ package no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain; +import no.nav.testnav.libs.dto.organisasjon.v1.OrganisasjonDTO; + import java.util.List; import java.util.Random; -import no.nav.testnav.libs.dto.organisasjon.v1.OrganisasjonDTO; - public class Organisajon { private static final Random RANDOM = new Random(); private OrganisasjonDTO dto; @@ -30,16 +30,9 @@ public List getDriverVirksomheter() { } public boolean isOpplysningspliktig() { - switch (dto.getEnhetType()) { - case "AS": - case "NUF": - case "BRL": - case "KBO": - case "SA": - case "ENK": - return true; - default: - return false; - } + return switch (dto.getEnhetType()) { + case "AS", "NUF", "BRL", "KBO", "SA", "ENK" -> true; + default -> false; + }; } } \ No newline at end of file diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Timeline.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Timeline.java index 944547acfa4..4465aaafeeb 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Timeline.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/Timeline.java @@ -1,5 +1,7 @@ package no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain; +import lombok.Getter; + import java.time.LocalDate; import java.util.Collection; import java.util.Collections; @@ -15,6 +17,7 @@ public class Timeline { private final Map> timeline; private final Map> history; + @Getter private final Set updatedDates = new HashSet<>(); public Timeline(Map> map) { @@ -39,7 +42,7 @@ public LocalDate getLastDate() { } public void put(LocalDate date, T value, boolean updated) { - if(updated){ + if (updated) { updatedDates.add(date); } @@ -75,12 +78,9 @@ public void forEach(BiConsumer> action) { timeline.forEach((date, entries) -> action.accept(date, entries.getAll())); } - public Set getUpdatedDates(){ - return updatedDates; - } - public List applyForAll(Function function) { - return timeline.values().stream().flatMap(value -> value.getAll().stream().map(function)).collect(Collectors.toList()); + return timeline.values().stream().flatMap(value -> value.getAll().stream().map(function)) + .collect(Collectors.toList()); } public Set getHistory(LocalDate date) { diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/TimelineEntries.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/TimelineEntries.java index cb830d4f237..ba310fa6d3d 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/TimelineEntries.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/domain/TimelineEntries.java @@ -1,6 +1,5 @@ package no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain; -import java.util.HashMap; import java.util.Map; import java.util.Set; import java.util.TreeMap; @@ -17,7 +16,7 @@ public void put(T value) { entires.put(value.getId(), value); } - public Set getAll(){ + public Set getAll() { return entires.entrySet().stream().map(Map.Entry::getValue).collect(Collectors.toSet()); } } diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OppsummeringsdokumentService.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OppsummeringsdokumentService.java index fec88a27d37..53b74f33547 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OppsummeringsdokumentService.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OppsummeringsdokumentService.java @@ -2,6 +2,11 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.consumer.OppsummeringsdokumentConsumer; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.OppsummeringsdokumentTimeline; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Person; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.amelding.Arbeidsforhold; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.amelding.Oppsummeringsdokument; import org.springframework.stereotype.Service; import reactor.core.publisher.Flux; @@ -10,12 +15,6 @@ import java.util.List; import java.util.stream.Collectors; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.consumer.OppsummeringsdokumentConsumer; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.OppsummeringsdokumentTimeline; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Person; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.amelding.Arbeidsforhold; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.amelding.Oppsummeringsdokument; - @Slf4j @Service @RequiredArgsConstructor @@ -48,7 +47,7 @@ public void save(List personer, String miljo) { .values() .parallelStream() .map(OppsummeringsdokumentTimeline::new) - .forEach(timeline -> timeline.applyForAll((value) -> oppsummeringsdokumentConsumer.save(value.toDTO(), miljo).block())); + .forEach(timeline -> timeline.applyForAll(value -> oppsummeringsdokumentConsumer.save(value.toDTO(), miljo).block())); } private List getOppdatertOppsumeringsdokument(List personer, LocalDate kalendermnd, String miljo) { @@ -63,8 +62,8 @@ private List getOppdatertOppsumeringsdokument(List { oppsummeringsdokument.addAll(entry.getValue()); return oppsummeringsdokument; - }) - ).collect(Collectors.toList()) + })) + .toList() ).collectList().block(); log.info("Oppdatert {} opplysningsplikitg med nye arbeidsforhold.", oppsummeringsdokumenter.size()); return oppsummeringsdokumenter; diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OrkestratorService.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OrkestratorService.java index 2f63910a520..9b2d4081a46 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OrkestratorService.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/OrkestratorService.java @@ -5,7 +5,6 @@ import reactor.core.publisher.Flux; import java.time.LocalDate; -import java.util.List; @Service @RequiredArgsConstructor diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/PersonArbeidsforholdHistorkkService.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/PersonArbeidsforholdHistorkkService.java index 7c502e278f3..890b9c49c0c 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/PersonArbeidsforholdHistorkkService.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/service/PersonArbeidsforholdHistorkkService.java @@ -2,6 +2,10 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Organisajon; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Person; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Timeline; +import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.amelding.Arbeidsforhold; import org.springframework.stereotype.Service; import reactor.core.publisher.Flux; import reactor.core.publisher.Mono; @@ -22,11 +26,6 @@ import java.util.concurrent.Executor; import java.util.concurrent.atomic.AtomicInteger; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Organisajon; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Person; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.Timeline; -import no.nav.registre.testnav.genererarbeidsforholdpopulasjonservice.domain.amelding.Arbeidsforhold; - @Slf4j @Service @RequiredArgsConstructor @@ -137,10 +136,6 @@ private Map> generer( var generert = generer(previous, organisajoner, ident, dates); - if (generert == null) { - return null; - } - map.putAll(generert); return map; } @@ -157,7 +152,7 @@ private Map> generer( dateList.size() ).block(); } catch (Exception ex) { - return null; + return Collections.emptyMap(); } diff --git a/apps/generer-navn-service/build.gradle b/apps/generer-navn-service/build.gradle index 087a4f44ce7..fa35019c86d 100644 --- a/apps/generer-navn-service/build.gradle +++ b/apps/generer-navn-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -65,8 +65,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -78,4 +78,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/DevConfig.java b/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/DevConfig.java index 927694e57e2..f6e66ec6af2 100644 --- a/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/DevConfig.java +++ b/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/generer-organisasjon-populasjon-service/build.gradle b/apps/generer-organisasjon-populasjon-service/build.gradle index e3b630e334b..d1511f2cde0 100644 --- a/apps/generer-organisasjon-populasjon-service/build.gradle +++ b/apps/generer-organisasjon-populasjon-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -84,8 +84,8 @@ dependencies { implementation 'com.zaxxer:HikariCP' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.postgresql:postgresql' @@ -97,4 +97,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/DevConfig.java b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/DevConfig.java index 62bc8796ab6..43b0705cc51 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/DevConfig.java +++ b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/DevConfig.java @@ -8,10 +8,14 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -public class DevConfig extends AbstractVaultConfiguration { +public class DevConfig extends AbstractVaultConfiguration { + + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override public VaultEndpoint vaultEndpoint() { @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/service/GenererOpplysningspliktigService.java b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/service/GenererOpplysningspliktigService.java index 099b1fefa34..17a248afc16 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/service/GenererOpplysningspliktigService.java +++ b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/service/GenererOpplysningspliktigService.java @@ -2,6 +2,9 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnav.genererorganisasjonpopulasjonservice.consumer.GenererNavnConsumer; +import no.nav.registre.testnav.genererorganisasjonpopulasjonservice.consumer.OrgnummerConsumer; +import no.nav.registre.testnav.genererorganisasjonpopulasjonservice.domain.Organisasjon; import org.springframework.stereotype.Service; import java.util.ArrayList; @@ -11,10 +14,6 @@ import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import no.nav.registre.testnav.genererorganisasjonpopulasjonservice.consumer.GenererNavnConsumer; -import no.nav.registre.testnav.genererorganisasjonpopulasjonservice.consumer.OrgnummerConsumer; -import no.nav.registre.testnav.genererorganisasjonpopulasjonservice.domain.Organisasjon; - @Slf4j @Service @RequiredArgsConstructor @@ -25,8 +24,9 @@ public class GenererOpplysningspliktigService { public List generer(Integer antall) { var futures = new ArrayList>(antall); + var random = new Random(); for (int index = 0; index < antall; index++) { - futures.add(generer()); + futures.add(generer(random)); } var organisasjoner = new ArrayList(); @@ -51,8 +51,7 @@ public List generer(Integer antall) { return organisasjoner; } - private CompletableFuture generer() { - var random = new Random(); + private CompletableFuture generer(Random random) { return CompletableFuture.supplyAsync(() -> { var opplysningspliktig = generer("AS"); for (int index = 0; index <= random.nextInt(5); index++) { diff --git a/apps/generer-synt-amelding-service/build.gradle b/apps/generer-synt-amelding-service/build.gradle index 5e2a68f46bd..8c5e9a1d17f 100644 --- a/apps/generer-synt-amelding-service/build.gradle +++ b/apps/generer-synt-amelding-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -32,7 +32,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -59,8 +59,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -72,4 +72,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/DevConfig.java b/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/DevConfig.java index 586ec31ca49..61efc55de57 100644 --- a/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/DevConfig.java +++ b/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/geografiske-kodeverk-service/build.gradle b/apps/geografiske-kodeverk-service/build.gradle index d8ba658177a..c6509e5678f 100644 --- a/apps/geografiske-kodeverk-service/build.gradle +++ b/apps/geografiske-kodeverk-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -64,8 +64,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -80,4 +80,4 @@ dependencies { } description = 'geografiske-kodeverk-service' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties b/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/DevConfig.java b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/DevConfig.java index 9d4111e4c10..32af165835f 100644 --- a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/DevConfig.java +++ b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } diff --git a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/exceptions/DollyFunctionalException.java b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/exceptions/DollyFunctionalException.java new file mode 100644 index 00000000000..65528440cfa --- /dev/null +++ b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/exceptions/DollyFunctionalException.java @@ -0,0 +1,8 @@ +package no.nav.registre.testnav.geografiskekodeverkservice.exceptions; + +public class DollyFunctionalException extends RuntimeException { + + public DollyFunctionalException(String message, Throwable cause) { + super(message, cause); + } +} \ No newline at end of file diff --git a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/service/KodeverkService.java b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/service/KodeverkService.java index 6ce9ebabb96..bc543840372 100644 --- a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/service/KodeverkService.java +++ b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/service/KodeverkService.java @@ -3,6 +3,7 @@ import lombok.NoArgsConstructor; import lombok.extern.slf4j.Slf4j; import no.nav.registre.testnav.geografiskekodeverkservice.domain.Kodeverk; +import no.nav.registre.testnav.geografiskekodeverkservice.exceptions.DollyFunctionalException; import org.apache.commons.lang3.StringUtils; import org.springframework.core.io.ClassPathResource; import org.springframework.stereotype.Service; @@ -10,8 +11,8 @@ import java.io.IOException; import java.io.InputStreamReader; import java.nio.charset.StandardCharsets; -import java.util.*; -import java.util.stream.Collectors; +import java.util.List; +import java.util.Properties; @Slf4j @Service @@ -30,27 +31,12 @@ public class KodeverkService { embeterKodeverkListe = loadKodeverk("vergemaal/embeter.yaml"); } - private static List loadKodeverk(String path) { - var resource = new ClassPathResource(path); - try (final InputStreamReader stream = new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8)) { - final Properties properties = new Properties(); - properties.load(stream); - return properties - .entrySet() - .stream() - .map(Kodeverk::new) - .collect(Collectors.toList()); - } catch (IOException e) { - throw new RuntimeException("Lesing av kodeverk fra " + path + " feilet", e); - } - } - public List getKommuner(String kommunenr, String kommunenavn) { return kommunerKodeverkListe .stream() .filter(kodeverk -> StringUtils.isBlank(kommunenr) || kommunenr.equals(kodeverk.getKode())) .filter(kodeverk -> StringUtils.isBlank(kommunenavn) || kommunenavn.equalsIgnoreCase(kodeverk.getNavn())) - .collect(Collectors.toList()); + .toList(); } public List getLand(String landkode, String land) { @@ -58,7 +44,7 @@ public List getLand(String landkode, String land) { .stream() .filter(kodeverk -> StringUtils.isBlank(landkode) || landkode.equals(kodeverk.getKode())) .filter(kodeverk -> StringUtils.isBlank(land) || land.equalsIgnoreCase(kodeverk.getNavn())) - .collect(Collectors.toList()); + .toList(); } public List getPostnummer(String postnummer, String poststed) { @@ -66,7 +52,7 @@ public List getPostnummer(String postnummer, String poststed) { .stream() .filter(kodeverk -> StringUtils.isBlank(postnummer) || postnummer.equals(kodeverk.getKode())) .filter(kodeverk -> StringUtils.isBlank(poststed) || poststed.equalsIgnoreCase(kodeverk.getNavn())) - .collect(Collectors.toList()); + .toList(); } public List getEmbeter(String embetekode, String embetenavn) { @@ -74,6 +60,21 @@ public List getEmbeter(String embetekode, String embetenavn) { .stream() .filter(kodeverk -> StringUtils.isBlank(embetekode) || embetekode.equals(kodeverk.getKode())) .filter(kodeverk -> StringUtils.isBlank(embetenavn) || embetenavn.equals(kodeverk.getNavn())) - .collect(Collectors.toList()); + .toList(); + } + + private static List loadKodeverk(String path) { + var resource = new ClassPathResource(path); + try (final InputStreamReader stream = new InputStreamReader(resource.getInputStream(), StandardCharsets.UTF_8)) { + final Properties properties = new Properties(); + properties.load(stream); + return properties + .entrySet() + .stream() + .map(Kodeverk::new) + .toList(); + } catch (IOException e) { + throw new DollyFunctionalException("Lesing av kodeverk fra " + path + " feilet", e); + } } } diff --git a/apps/helsepersonell-service/build.gradle b/apps/helsepersonell-service/build.gradle index 4957fdf15ba..5d3eb644946 100644 --- a/apps/helsepersonell-service/build.gradle +++ b/apps/helsepersonell-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -63,8 +63,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -76,4 +76,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 \ No newline at end of file +java.sourceCompatibility = JavaVersion.VERSION_20 \ No newline at end of file diff --git a/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties b/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/DevConfig.java b/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/DevConfig.java index b9056ab0e10..65cc4ffac61 100644 --- a/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/DevConfig.java +++ b/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/hodejegeren/build.gradle b/apps/hodejegeren/build.gradle index 862bb13d06d..be741df8d6e 100644 --- a/apps/hodejegeren/build.gradle +++ b/apps/hodejegeren/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,13 +68,13 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'com.jayway.jsonpath:json-path:2.6.0' + implementation 'com.jayway.jsonpath:json-path:2.7.0' implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'no.nav.registre:testnorge-consumers:1.12.0-RELEASE' @@ -90,4 +90,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties b/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties +++ b/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/VaultConfig.java b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/VaultConfig.java index eee4d3286af..14443eb107e 100644 --- a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/VaultConfig.java +++ b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/VaultConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "kv/preprod/fss/testnorge-hodejegeren/local", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class VaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/provider/HodejegerenController.java b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/provider/HodejegerenController.java index dddc4225402..175f5c2ed1c 100644 --- a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/provider/HodejegerenController.java +++ b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/provider/HodejegerenController.java @@ -7,6 +7,9 @@ import no.nav.testnav.apps.hodejegeren.provider.responses.kontoinfo.KontoinfoResponse; import no.nav.testnav.apps.hodejegeren.provider.responses.persondata.PersondataResponse; import no.nav.testnav.apps.hodejegeren.provider.responses.relasjon.RelasjonsResponse; +import no.nav.testnav.apps.hodejegeren.service.CacheService; +import no.nav.testnav.apps.hodejegeren.service.EksisterendeIdenterService; +import no.nav.testnav.apps.hodejegeren.service.EndringskodeTilFeltnavnMapperService; import org.springframework.http.MediaType; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -23,10 +26,6 @@ import java.util.Map; import java.util.Set; -import no.nav.testnav.apps.hodejegeren.service.CacheService; -import no.nav.testnav.apps.hodejegeren.service.EksisterendeIdenterService; -import no.nav.testnav.apps.hodejegeren.service.EndringskodeTilFeltnavnMapperService; - @RestController @RequiredArgsConstructor public class HodejegerenController { @@ -127,9 +126,10 @@ public List hentAlleIdenterIAldersgruppe( return eksisterendeIdenterService.finnLevendeIdenterIAldersgruppe(avspillergruppeId, minimumAlder, maksimumAlder); } - @ApiOperation(value = "Her bestilles et gitt antall identer med tilhørende nav-enhet som hentes tilfeldig fra TPSF. \n" - + "Disse er føreløpig ikke garantert til å være gyldige fnr med tilhørende arbeidsforhold for å få en sykemelding.\n" - + "De er garantert til å være myndige.") + @ApiOperation(value = """ + Her bestilles et gitt antall identer med tilhørende nav-enhet som hentes tilfeldig fra TPSF. + Disse er føreløpig ikke garantert til å være gyldige fnr med tilhørende arbeidsforhold for å få en sykemelding. + De er garantert til å være myndige.""") @GetMapping("api/v1/fnr-med-navkontor/{avspillergruppeId}") public List hentEksisterendeMyndigeIdenterMedNavKontor( @PathVariable("avspillergruppeId") Long avspillergruppeId, diff --git a/apps/import-person-service/build.gradle b/apps/import-person-service/build.gradle index a2a46a6c55b..25c027564cc 100644 --- a/apps/import-person-service/build.gradle +++ b/apps/import-person-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -71,8 +71,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -82,4 +82,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties b/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/DevConfig.java b/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/DevConfig.java index f038897b4bf..c631b48bf49 100644 --- a/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/DevConfig.java +++ b/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } diff --git a/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/domain/PersonList.java b/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/domain/PersonList.java index bbf65f26d4b..b105e6e1201 100644 --- a/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/domain/PersonList.java +++ b/apps/import-person-service/src/main/java/no/nav/testnav/apps/importpersonservice/domain/PersonList.java @@ -1,20 +1,21 @@ package no.nav.testnav.apps.importpersonservice.domain; -import java.util.List; -import java.util.stream.Collectors; - import no.nav.testnav.apps.importpersonservice.controller.dto.PersonListDTO; +import java.util.List; + public class PersonList { private final List list; public PersonList(PersonListDTO dto) { - this.list = dto.getPersonList().stream().map(Person::new).collect(Collectors.toList()); + this.list = dto.getPersonList().stream().map(Person::new) + .toList(); } public PersonList(List identer) { - this.list = identer.stream().map(Person::new).collect(Collectors.toList()); + this.list = identer.stream().map(Person::new) + .toList(); } public List getList() { diff --git a/apps/inntektsmelding-generator-service/build.gradle b/apps/inntektsmelding-generator-service/build.gradle index 6d4d9d42111..76a46c5c1e5 100644 --- a/apps/inntektsmelding-generator-service/build.gradle +++ b/apps/inntektsmelding-generator-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -59,14 +59,14 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'javax.xml.bind:jaxb-api:2.3.1' implementation 'javax.json.bind:javax.json.bind-api:1.0' - implementation 'javax.activation:activation:1.1' + implementation 'javax.activation:activation:1.1.1' implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.8' implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1' @@ -84,4 +84,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties b/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/DevConfig.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/DevConfig.java index 9072955be1a..bc2aaca40e3 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/DevConfig.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/provider/validation/XML201809Validator.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/provider/validation/XML201809Validator.java index 3ec4d6b83dd..48b2e981f12 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/provider/validation/XML201809Validator.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/provider/validation/XML201809Validator.java @@ -6,7 +6,6 @@ import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.stream.Collectors; @Component public class XML201809Validator { @@ -24,7 +23,7 @@ public static void validate(RsInntektsmelding inntektsmelding) throws Validation List errors = rules.entrySet().stream() .filter(s -> s.getValue().equals(true)) .map(Map.Entry::getKey) - .collect(Collectors.toList()); + .toList(); if (!errors.isEmpty()) { throw new ValidationException(errors); diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/DelvisFravearDTO.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/DelvisFravearDTO.java index 085eaf6210e..edae4a19155 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/DelvisFravearDTO.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/DelvisFravearDTO.java @@ -9,7 +9,6 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; -import java.util.stream.Collectors; @Value @NoArgsConstructor(force = true) @@ -31,8 +30,9 @@ public XMLDelvisFravaer toXmlElement() { return xmlDelvisFravaer; } - static List convert(List list){ - return list.stream().map(DelvisFravearDTO::toXmlElement).collect(Collectors.toList()); + static List convert(List list) { + return list.stream().map(DelvisFravearDTO::toXmlElement) + .toList(); } } \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/EndringIRefusjonDTO.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/EndringIRefusjonDTO.java index 6979044d75b..6d00a64c683 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/EndringIRefusjonDTO.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/EndringIRefusjonDTO.java @@ -9,7 +9,6 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; -import java.util.stream.Collectors; @Value @NoArgsConstructor(force = true) @@ -31,7 +30,8 @@ public XMLEndringIRefusjon toXmlElement() { return xmlEndringIRefusjon; } - static List convert(List list){ - return list.stream().map(EndringIRefusjonDTO::toXmlElement).collect(Collectors.toList()); + static List convert(List list) { + return list.stream().map(EndringIRefusjonDTO::toXmlElement) + .toList(); } } \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/GraderingIForeldrepengerDTO.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/GraderingIForeldrepengerDTO.java index ae22c18d69c..235d635ccda 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/GraderingIForeldrepengerDTO.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/GraderingIForeldrepengerDTO.java @@ -8,7 +8,6 @@ import java.math.BigInteger; import java.util.List; -import java.util.stream.Collectors; @Value @@ -38,6 +37,7 @@ public XMLGraderingIForeldrepenger toXmlElement() { } static List convert(List list) { - return list.stream().map(GraderingIForeldrepengerDTO::toXmlElement).collect(Collectors.toList()); + return list.stream().map(GraderingIForeldrepengerDTO::toXmlElement) + .toList(); } } \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/NaturalYtelseDetaljerDTO.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/NaturalYtelseDetaljerDTO.java index 02ca98a4b14..5f62a3e3698 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/NaturalYtelseDetaljerDTO.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/NaturalYtelseDetaljerDTO.java @@ -10,7 +10,6 @@ import java.math.BigDecimal; import java.time.LocalDate; import java.util.List; -import java.util.stream.Collectors; import static org.apache.commons.lang3.StringUtils.isBlank; @@ -46,7 +45,8 @@ public XMLNaturalytelseDetaljer toXmlElement() { } static List covert(List list) { - return list.stream().map(NaturalYtelseDetaljerDTO::toXmlElement).collect(Collectors.toList()); + return list.stream().map(NaturalYtelseDetaljerDTO::toXmlElement) + .toList(); } } \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/PeriodeDTO.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/PeriodeDTO.java index 5d0cbcbf857..64db65add8e 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/PeriodeDTO.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/PeriodeDTO.java @@ -8,7 +8,6 @@ import java.time.LocalDate; import java.util.List; -import java.util.stream.Collectors; @Value @@ -29,6 +28,7 @@ public XMLPeriode toXmlElement() { } static List convert(List list) { - return list.stream().map(PeriodeDTO::toXmlElement).collect(Collectors.toList()); + return list.stream().map(PeriodeDTO::toXmlElement) + .toList(); } } \ No newline at end of file diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/UtsettelseAvForeldrepengerDTO.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/UtsettelseAvForeldrepengerDTO.java index 2c0412907db..8b8090e2b7a 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/UtsettelseAvForeldrepengerDTO.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/v20181211/dto/v1/UtsettelseAvForeldrepengerDTO.java @@ -8,7 +8,6 @@ import no.seres.xsd.nav.inntektsmelding_m._20181211.XMLUtsettelseAvForeldrepenger; import java.util.List; -import java.util.stream.Collectors; @Value @NoArgsConstructor(force = true) @@ -34,6 +33,7 @@ public XMLUtsettelseAvForeldrepenger toXmlElement() { } static List convert(List list){ - return list.stream().map(UtsettelseAvForeldrepengerDTO::toXmlElement).collect(Collectors.toList()); + return list.stream().map(UtsettelseAvForeldrepengerDTO::toXmlElement) + .toList(); } } diff --git a/apps/inntektsmelding-service/build.gradle b/apps/inntektsmelding-service/build.gradle index 2b5ae98060c..9020a068588 100644 --- a/apps/inntektsmelding-service/build.gradle +++ b/apps/inntektsmelding-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -64,8 +64,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.aspectj:aspectjweaver:1.9.7' @@ -94,4 +94,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/inntektsmelding-service/src/main/java/no/nav/registre/testnav/inntektsmeldingservice/config/DevConfig.java b/apps/inntektsmelding-service/src/main/java/no/nav/registre/testnav/inntektsmeldingservice/config/DevConfig.java index e805d656d2a..6fe2819fa9e 100644 --- a/apps/inntektsmelding-service/src/main/java/no/nav/registre/testnav/inntektsmeldingservice/config/DevConfig.java +++ b/apps/inntektsmelding-service/src/main/java/no/nav/registre/testnav/inntektsmeldingservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/jenkins-batch-status-service/build.gradle b/apps/jenkins-batch-status-service/build.gradle index f3b79544efd..536a82029ba 100644 --- a/apps/jenkins-batch-status-service/build.gradle +++ b/apps/jenkins-batch-status-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,8 +67,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -80,4 +80,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties b/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/JenkinsBatchStatusServiceApplicationStarter.java b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/JenkinsBatchStatusServiceApplicationStarter.java index b80a5be3b48..934546818b2 100644 --- a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/JenkinsBatchStatusServiceApplicationStarter.java +++ b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/JenkinsBatchStatusServiceApplicationStarter.java @@ -2,7 +2,6 @@ import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.cache.annotation.EnableCaching; @SpringBootApplication public class JenkinsBatchStatusServiceApplicationStarter { diff --git a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/DevConfig.java b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/DevConfig.java index 70b311905c3..bd823ec6376 100644 --- a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/DevConfig.java +++ b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } diff --git a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/service/RetryService.java b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/service/RetryService.java index b813601dde7..46e7dede881 100644 --- a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/service/RetryService.java +++ b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/service/RetryService.java @@ -1,14 +1,12 @@ package no.nav.registre.testnorge.jenkinsbatchstatusservice.service; import lombok.RequiredArgsConstructor; -import org.springframework.scheduling.annotation.Async; +import no.nav.registre.testnorge.jenkinsbatchstatusservice.retry.RetryCommand; +import no.nav.registre.testnorge.jenkinsbatchstatusservice.retry.RetryConfig; import org.springframework.stereotype.Service; import java.util.concurrent.Executor; -import no.nav.registre.testnorge.jenkinsbatchstatusservice.retry.RetryCommand; -import no.nav.registre.testnorge.jenkinsbatchstatusservice.retry.RetryConfig; - @Service @RequiredArgsConstructor public class RetryService { diff --git a/apps/joark-dokument-service/build.gradle b/apps/joark-dokument-service/build.gradle index abca655ea8d..05ba6cbb91e 100644 --- a/apps/joark-dokument-service/build.gradle +++ b/apps/joark-dokument-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -64,8 +64,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -77,4 +77,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties b/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/DevConfig.java b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/DevConfig.java index 7e7b2856d7c..be4cd555011 100644 --- a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/DevConfig.java +++ b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/consumer/command/GetDokumentInfoCommand.java b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/consumer/command/GetDokumentInfoCommand.java index 5ed18c919d3..25179f3227d 100644 --- a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/consumer/command/GetDokumentInfoCommand.java +++ b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/consumer/command/GetDokumentInfoCommand.java @@ -41,9 +41,7 @@ public Mono call() { )) .retrieve() .bodyToMono(Response.class) - .doOnError(throwable -> { - log.error("Feilet under henting av Journalpost", throwable); - }) + .doOnError(throwable -> log.error("Feilet under henting av Journalpost", throwable)) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)); } diff --git a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/controller/v1/DokumentController.java b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/controller/v1/DokumentController.java index fa523ca6d0c..187a6617be7 100644 --- a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/controller/v1/DokumentController.java +++ b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/controller/v1/DokumentController.java @@ -12,7 +12,6 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; -import java.util.stream.Collectors; @RequiredArgsConstructor @RestController @@ -32,7 +31,7 @@ public ResponseEntity> hentDokumenter( .journalpostId(journalpost.getJournalpostId()) .dokumentInfoId(dokument.getDokumentInfoId()) .build() - ).collect(Collectors.toList()); + ).toList(); return ResponseEntity.ok(list); } diff --git a/apps/miljoer-service/build.gradle b/apps/miljoer-service/build.gradle index 5a6828d8afe..10d93728224 100644 --- a/apps/miljoer-service/build.gradle +++ b/apps/miljoer-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -65,8 +65,8 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -78,4 +78,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties b/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java index 7616f4e8b9a..6551a127cf2 100644 --- a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java +++ b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/DevConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/mn-synt-arbeidsforhold-service/build.gradle b/apps/mn-synt-arbeidsforhold-service/build.gradle index 821d5185dab..fcaceb88abb 100644 --- a/apps/mn-synt-arbeidsforhold-service/build.gradle +++ b/apps/mn-synt-arbeidsforhold-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -76,8 +76,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' @@ -88,4 +88,4 @@ dependencies { } description = 'mn-synt-arbeidsforhold-service' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties b/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/adapter/IdentAdapter.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/adapter/IdentAdapter.java index b5a0eea2fbc..0d113b7fdeb 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/adapter/IdentAdapter.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/adapter/IdentAdapter.java @@ -2,8 +2,6 @@ import reactor.core.publisher.Flux; -import java.util.Set; - public interface IdentAdapter { Flux getIdenter(String miljo, int antall); } diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/VaultConfig.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/VaultConfig.java index 1a442ca95e5..c8c37deee55 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/VaultConfig.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/VaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @VaultPropertySource(value = "kv/preprod/fss/mn-synt-arbeidsforhold-service/dev", ignoreSecretNotFound = false) -public class VaultConfig extends AbstractVaultConfiguration { +public class VaultConfig extends AbstractVaultConfiguration { + + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override public VaultEndpoint vaultEndpoint() { @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/consumer/OppsummeringsdokumentConsumer.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/consumer/OppsummeringsdokumentConsumer.java index acdf9e6ab2c..60faaa4c920 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/consumer/OppsummeringsdokumentConsumer.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/consumer/OppsummeringsdokumentConsumer.java @@ -64,21 +64,6 @@ public OppsummeringsdokumentConsumer( .build(); } - private CompletableFuture saveOpplysningspliktig(Opplysningspliktig opplysningspliktig, String miljo) { - AccessToken accessToken = tokenExchange.exchange(properties).block(); - return CompletableFuture.supplyAsync( - () -> new SaveOppsummeringsdokumenterCommand( - webClient, - accessToken.getTokenValue(), - opplysningspliktig.toDTO(), - miljo, - applicationProperties.getName(), - Populasjon.MINI_NORGE - ).call().block(), - executor - ); - } - public Optional getOpplysningspliktig(Organisajon organisajon, LocalDate kalendermaaned, String miljo) { AccessToken accessToken = tokenExchange.exchange(properties).block(); var dto = new GetOppsummeringsdokumentCommand(webClient, accessToken.getTokenValue(), organisajon.getOrgnummer(), kalendermaaned, miljo).call().block(); @@ -104,10 +89,26 @@ public void sendOpplysningspliktig(Opplysningspliktig opplysningspliktig, String @SneakyThrows public void sendOpplysningspliktig(List opplysningspliktig, String miljo) { - var futures = opplysningspliktig.stream().map(value -> saveOpplysningspliktig(value, miljo)).collect(Collectors.toList()); + var futures = opplysningspliktig.stream().map(value -> saveOpplysningspliktig(value, miljo)) + .toList(); for (var future : futures) { future.get(); } } + private CompletableFuture saveOpplysningspliktig(Opplysningspliktig opplysningspliktig, String miljo) { + AccessToken accessToken = tokenExchange.exchange(properties).block(); + return CompletableFuture.supplyAsync( + () -> new SaveOppsummeringsdokumenterCommand( + webClient, + accessToken.getTokenValue(), + opplysningspliktig.toDTO(), + miljo, + applicationProperties.getName(), + Populasjon.MINI_NORGE + ).call().block(), + executor + ); + } + } diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/domain/Organisajon.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/domain/Organisajon.java index 2113569185a..a04876d06e7 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/domain/Organisajon.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/domain/Organisajon.java @@ -30,16 +30,9 @@ public List getDriverVirksomheter() { } public boolean isOpplysningspliktig() { - switch (dto.getEnhetType()) { - case "AS": - case "NUF": - case "BRL": - case "KBO": - case "SA": - case "ENK": - return true; - default: - return false; - } + return switch (dto.getEnhetType()) { + case "AS", "NUF", "BRL", "KBO", "SA", "ENK" -> true; + default -> false; + }; } } \ No newline at end of file diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/ArbeidsforholdHistorikkService.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/ArbeidsforholdHistorikkService.java index d83166d4cd7..029e40d28fe 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/ArbeidsforholdHistorikkService.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/ArbeidsforholdHistorikkService.java @@ -2,6 +2,10 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Arbeidsforhold; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.ArbeidsforholdMap; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Opplysningspliktig; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Organisajon; import org.springframework.stereotype.Service; import reactor.core.publisher.Flux; @@ -19,12 +23,6 @@ import java.util.concurrent.CompletableFuture; import java.util.concurrent.Executor; import java.util.concurrent.TimeUnit; -import java.util.stream.Collectors; - -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Arbeidsforhold; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.ArbeidsforholdMap; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Opplysningspliktig; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Organisajon; @Slf4j @Service @@ -35,6 +33,52 @@ public class ArbeidsforholdHistorikkService { private final OpplysningspliktigService opplysningspliktigService; private final ArbeidsforholdSyntService arbeidsforholdSyntService; + public List populate(LocalDate fom, LocalDate tom, int maxIdenter, String miljo) { + var startTimeStamp = LocalDateTime.now(); + log.info("Starter syntetisering ({}).", startTimeStamp); + + var dates = findAllDatesBetween(fom, tom); + var identer = identService.getIdenterUtenArbeidsforhold(miljo, maxIdenter); + + log.info("Syntentiser for person(er) mellom {} - {}...", fom, tom); + var arbeidsforholdMapList = getArbeidsforholdMapList(identer, dates, miljo); + + if (arbeidsforholdMapList.isEmpty()) { + log.warn("Fikk ikke opprettet syntetisk arbeidsforhold. Avslutter syntetisering..."); + return Collections.emptyList(); + } + + for (var kalenermnd : dates) { + report(arbeidsforholdMapList, kalenermnd, miljo); + } + log.info("Syntetisering ferdig for {} person(er) ({} - {}).", + arbeidsforholdMapList.size(), + startTimeStamp, + LocalDateTime.now() + ); + return arbeidsforholdMapList.stream().map(ArbeidsforholdMap::getIdent) + .toList(); + } + + public void develop(LocalDate fom, LocalDate tom, String miljo) { + var startTimeStamp = LocalDateTime.now(); + log.info("Starter utvikling av populasjon ({}).", startTimeStamp); + + developArbeidsforhold(findAllDatesBetween(fom, tom), miljo).forEach((kalenermnd, list) -> { + var opplysningspliktigList = opplysningspliktigService.getAllOpplysningspliktig(kalenermnd, miljo); + list.forEach(arbeidsforhold -> { + var opplysningspliktig = findOpplysningspliktigForVirksomhet(arbeidsforhold.getVirksomhetsnummer(), opplysningspliktigList); + opplysningspliktig.addArbeidsforhold(arbeidsforhold); + }); + opplysningspliktigService.send(opplysningspliktigList, miljo); + }); + + log.info("Utvikling av populasjon ferdig ({} - {}).", + startTimeStamp, + LocalDateTime.now() + ); + } + private Map> developArbeidsforhold(Set dates, String miljo) { var map = new HashMap>(); var kalenermnd = dates.stream().findFirst(); @@ -50,7 +94,7 @@ private Map> developArbeidsforhold(Set futureMap(dates.iterator(), arbeidsforhold, organisasjoner)) - .collect(Collectors.toList()); + .toList(); for (var future : futures) { try { @@ -175,7 +219,6 @@ private Map createArbeidsforholdHistorikk(final Strin return map; } - private CompletableFuture> futureMap(Iterator dates, Arbeidsforhold previous, List organisajoner) { return CompletableFuture.supplyAsync(() -> develop(dates, previous, organisajoner), executor); } @@ -211,51 +254,6 @@ private List getArbeidsforholdMapList(Flux identer, S return list; } - public List populate(LocalDate fom, LocalDate tom, int maxIdenter, String miljo) { - var startTimeStamp = LocalDateTime.now(); - log.info("Starter syntetisering ({}).", startTimeStamp); - - var dates = findAllDatesBetween(fom, tom); - var identer = identService.getIdenterUtenArbeidsforhold(miljo, maxIdenter); - - log.info("Syntentiser for person(er) mellom {} - {}...", fom, tom); - var arbeidsforholdMapList = getArbeidsforholdMapList(identer, dates, miljo); - - if (arbeidsforholdMapList.isEmpty()) { - log.warn("Fikk ikke opprettet syntetisk arbeidsforhold. Avslutter syntetisering..."); - return Collections.emptyList(); - } - - for (var kalenermnd : dates) { - report(arbeidsforholdMapList, kalenermnd, miljo); - } - log.info("Syntetisering ferdig for {} person(er) ({} - {}).", - arbeidsforholdMapList.size(), - startTimeStamp, - LocalDateTime.now() - ); - return arbeidsforholdMapList.stream().map(ArbeidsforholdMap::getIdent).collect(Collectors.toList()); - } - - public void develop(LocalDate fom, LocalDate tom, String miljo) { - var startTimeStamp = LocalDateTime.now(); - log.info("Starter utvikling av populasjon ({}).", startTimeStamp); - - developArbeidsforhold(findAllDatesBetween(fom, tom), miljo).forEach((kalenermnd, list) -> { - var opplysningspliktigList = opplysningspliktigService.getAllOpplysningspliktig(kalenermnd, miljo); - list.forEach(arbeidsforhold -> { - var opplysningspliktig = findOpplysningspliktigForVirksomhet(arbeidsforhold.getVirksomhetsnummer(), opplysningspliktigList); - opplysningspliktig.addArbeidsforhold(arbeidsforhold); - }); - opplysningspliktigService.send(opplysningspliktigList, miljo); - }); - - log.info("Utvikling av populasjon ferdig ({} - {}).", - startTimeStamp, - LocalDateTime.now() - ); - } - private void report(List arbeidsforholdMapList, LocalDate kalenermnd, String miljo) { var opplysningspliktige = opplysningspliktigService.getAllOpplysningspliktig(kalenermnd, miljo); for (var arbeidsforholdMap : arbeidsforholdMapList) { diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/OpplysningspliktigService.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/OpplysningspliktigService.java index b53d7cabc83..1d161567bb0 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/OpplysningspliktigService.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/service/OpplysningspliktigService.java @@ -2,21 +2,18 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; -import org.springframework.cache.annotation.CacheConfig; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.consumer.GenererOrganisasjonPopulasjonConsumer; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.consumer.OppsummeringsdokumentConsumer; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.consumer.OrganisasjonConsumer; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Opplysningspliktig; +import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Organisajon; import org.springframework.stereotype.Service; import java.time.LocalDate; import java.util.List; -import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.consumer.GenererOrganisasjonPopulasjonConsumer; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.consumer.OppsummeringsdokumentConsumer; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.consumer.OrganisasjonConsumer; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Opplysningspliktig; -import no.nav.registre.testnorge.mn.syntarbeidsforholdservice.domain.Organisajon; - @Slf4j @Service @RequiredArgsConstructor @@ -30,26 +27,15 @@ public List getOpplysningspliktigeOrganisasjoner(String miljo) { return organisasjonConssumer .getOrganisasjoner(opplysningspliktigOrgnummer, miljo) .stream() - .filter(value -> !value.getDriverVirksomheter().isEmpty()) + .filter(value -> !value.getDriverVirksomheter().isEmpty()) .map(Organisajon::new) - .collect(Collectors.toList()); - } - - private Opplysningspliktig getOpplysningspliktig(Organisajon organisajon, LocalDate kalendermaaned, String miljo) { - Optional opplysningspliktig = oppsummeringsdokumentConsumer.getOpplysningspliktig(organisajon, kalendermaaned, miljo); - if (opplysningspliktig.isPresent()) { - Opplysningspliktig temp = opplysningspliktig.get(); - temp.setVersion(temp.getVersion() + 1); - temp.setKalendermaaned(kalendermaaned); - return temp; - } - return new Opplysningspliktig(organisajon, kalendermaaned); + .toList(); } public List getAllOpplysningspliktig(LocalDate kalendermaaned, String miljo) { var list = getOpplysningspliktigeOrganisasjoner(miljo); log.info("Fant {} opplysningspliktig i Mini-Norge Ereg.", list.stream().map(Organisajon::getOrgnummer).collect(Collectors.joining(", "))); - return list.stream().map(organisajon -> getOpplysningspliktig(organisajon, kalendermaaned, miljo)).collect(Collectors.toList()); + return list.stream().map(organisajon -> getOpplysningspliktig(organisajon, kalendermaaned, miljo)).toList(); } public void send(List list, String miljo) { @@ -62,7 +48,18 @@ public void send(List list, String miljo) { ); } return value.isChanged(); - }).collect(Collectors.toList()); + }).toList(); oppsummeringsdokumentConsumer.sendOpplysningspliktig(opplysningspliktige, miljo); } + + private Opplysningspliktig getOpplysningspliktig(Organisajon organisajon, LocalDate kalendermaaned, String miljo) { + Optional opplysningspliktig = oppsummeringsdokumentConsumer.getOpplysningspliktig(organisajon, kalendermaaned, miljo); + if (opplysningspliktig.isPresent()) { + Opplysningspliktig temp = opplysningspliktig.get(); + temp.setVersion(temp.getVersion() + 1); + temp.setKalendermaaned(kalendermaaned); + return temp; + } + return new Opplysningspliktig(organisajon, kalendermaaned); + } } diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index 508b8a4a116..2e7c87cb159 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -93,8 +93,8 @@ dependencies { implementation 'org.apache.kafka:kafka-clients:7.0.0-ce' implementation 'io.confluent:kafka-avro-serializer:7.3.2' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.hibernate.validator:hibernate-validator' implementation 'no.nav.freg:freg-security-oidc:2c24d35d' @@ -106,4 +106,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties b/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java index 89a2ba7fb3d..936ab2dbad3 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/adapter/OppsummeringsdokumentAdapter.java @@ -28,6 +28,7 @@ import java.time.LocalDate; import java.util.ArrayList; import java.util.List; +import java.util.Objects; import java.util.Optional; import java.util.stream.Collectors; @@ -36,6 +37,7 @@ @RequiredArgsConstructor public class OppsummeringsdokumentAdapter { + private static final String MILJO = "miljo"; private final ObjectMapper objectMapper; private final OppsummeringsdokumentRepository repository; private final ElasticsearchOperations operations; @@ -74,7 +76,7 @@ public Oppsummeringsdokument get(String id) { public List getAllCurrentDocumentsBy(String miljo) { return getAllCurrentDocumentsBy(new NativeSearchQueryBuilder() .withQuery( - QueryBuilders.matchQuery("miljo", miljo) + QueryBuilders.matchQuery(MILJO, miljo) ) ); } @@ -83,7 +85,7 @@ public Page getAllCurrentDocumentsBy(String miljo, Intege var pageable = PageRequest.of(page, 1); return getAllCurrentDocumentsBy(new NativeSearchQueryBuilder() .withQuery( - QueryBuilders.matchQuery("miljo", miljo) + QueryBuilders.matchQuery(MILJO, miljo) ).withPageable(pageable), pageable ); @@ -91,7 +93,7 @@ public Page getAllCurrentDocumentsBy(String miljo, Intege public List getAllCurrentDocumentsBy(String miljo, String ident) { var queryBuilders = new ArrayList(); - queryBuilders.add(QueryBuilders.matchQuery("miljo", miljo)); + queryBuilders.add(QueryBuilders.matchQuery(MILJO, miljo)); queryBuilders.add(QueryBuilders.matchQuery("virksomheter.personer.ident", ident)); @@ -109,7 +111,7 @@ public Page getAllCurrentDocumentsBy( var pageable = PageRequest.of(page, 1); var queryBuilders = new ArrayList(); - queryBuilders.add(QueryBuilders.matchQuery("miljo", miljo)); + queryBuilders.add(QueryBuilders.matchQuery(MILJO, miljo)); getKalendermaanedBetween(fom, tom).ifPresent(queryBuilders::add); Optional.ofNullable(ident).ifPresent(value -> queryBuilders.add( QueryBuilders.matchQuery("virksomheter.personer.ident", value) @@ -151,7 +153,8 @@ private Page getAllCurrentDocumentsBy(NativeSearchQueryBu OppsummeringsdokumentModel.class ); - var list = searchHist.get().map(SearchHit::getContent).collect(Collectors.toList()); + var list = searchHist.get().map(SearchHit::getContent) + .toList(); return new PageImpl<>( filterOnVersion(list), pageable, @@ -162,16 +165,17 @@ private Page getAllCurrentDocumentsBy(NativeSearchQueryBu private List getAllCurrentDocumentsBy(NativeSearchQueryBuilder builder) { builder.withSorts(SortBuilders.fieldSort("lastModified").order(SortOrder.ASC)); var list = operations.search( - builder.build(), - OppsummeringsdokumentModel.class - ).get().map(SearchHit::getContent).collect(Collectors.toList()); + builder.build(), + OppsummeringsdokumentModel.class + ).get().map(SearchHit::getContent) + .toList(); return filterOnVersion(list); } private List getAllCurrentDocumentsBy(String miljo, String orgnummer, LocalDate fom, LocalDate tom) { var queryBuilders = new ArrayList(); - queryBuilders.add(QueryBuilders.matchQuery("miljo", miljo)); + queryBuilders.add(QueryBuilders.matchQuery(MILJO, miljo)); queryBuilders.add(QueryBuilders.matchQuery("opplysningspliktigOrganisajonsnummer", orgnummer)); getKalendermaanedBetween(fom, tom).ifPresent(queryBuilders::add); @@ -219,8 +223,8 @@ private List filterOnVersion(List { @Query(value = "from OrderModel o1 where o1.uuid = ?1") diff --git a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/service/v2/OrderServiceV2.java b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/service/v2/OrderServiceV2.java index f7436267873..aaf777687fd 100644 --- a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/service/v2/OrderServiceV2.java +++ b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/service/v2/OrderServiceV2.java @@ -15,7 +15,6 @@ import java.util.List; import java.util.regex.Pattern; -import java.util.stream.Collectors; import java.util.stream.StreamSupport; @Slf4j @@ -99,7 +98,8 @@ public Status getStatus(Long id) { } public List find(String uuid) { - return repository.findBy(uuid).stream().map(Order::new).collect(Collectors.toList()); + return repository.findBy(uuid).stream().map(Order::new) + .toList(); } public void delete(String uuid) { @@ -110,7 +110,7 @@ public List findAll() { return StreamSupport .stream(repository.findAll().spliterator(), false) .map(Order::new) - .collect(Collectors.toList()); + .toList(); } private Status getStatusFromBatchId(Order order) { diff --git a/apps/organisasjon-faste-data-service/build.gradle b/apps/organisasjon-faste-data-service/build.gradle index 483d5f9b1ca..4ede8dfc775 100644 --- a/apps/organisasjon-faste-data-service/build.gradle +++ b/apps/organisasjon-faste-data-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -83,8 +83,8 @@ dependencies { implementation 'org.postgresql:postgresql' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' implementation 'org.hibernate.validator:hibernate-validator' @@ -95,4 +95,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/DevConfig.java b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/DevConfig.java index af5dc7d1d15..0d877ac7c64 100644 --- a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/DevConfig.java +++ b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static org.apache.commons.lang3.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/domain/Organisasjon.java b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/domain/Organisasjon.java index c4f3eddc6b8..775f7e12de3 100644 --- a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/domain/Organisasjon.java +++ b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/domain/Organisasjon.java @@ -4,22 +4,33 @@ import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.Value; +import no.nav.registre.testnorge.organisasjonfastedataservice.repository.model.OrganisasjonModel; +import no.nav.testnav.libs.dto.organisasjonfastedataservice.v1.Gruppe; +import no.nav.testnav.libs.dto.organisasjonfastedataservice.v1.OrganisasjonDTO; import java.util.Collections; import java.util.List; import java.util.Optional; import java.util.Set; -import java.util.stream.Collectors; - -import no.nav.testnav.libs.dto.organisasjonfastedataservice.v1.Gruppe; -import no.nav.testnav.libs.dto.organisasjonfastedataservice.v1.OrganisasjonDTO; -import no.nav.registre.testnorge.organisasjonfastedataservice.repository.model.OrganisasjonModel; @Value @AllArgsConstructor @NoArgsConstructor(force = true) public class Organisasjon { + String orgnummer; + String enhetstype; + String navn; + String redigertNavn; + String epost; + String internetAdresse; + String overenhet; + Adresse forretningsAdresse; + Adresse postadresse; + String opprinnelse; + Set tags; + @JsonIgnore + OrganisasjonModel model; public Organisasjon(OrganisasjonDTO dto) { orgnummer = dto.getOrgnummer(); enhetstype = dto.getEnhetstype(); @@ -35,20 +46,6 @@ public Organisasjon(OrganisasjonDTO dto) { model = null; } - String orgnummer; - String enhetstype; - String navn; - String redigertNavn; - String epost; - String internetAdresse; - String overenhet; - Adresse forretningsAdresse; - Adresse postadresse; - String opprinnelse; - Set tags; - @JsonIgnore - OrganisasjonModel model; - public Organisasjon(OrganisasjonModel model) { var organisasjon = model.getOrganisasjon(); orgnummer = model.getOrgnummer(); @@ -74,7 +71,8 @@ public boolean kanHaArbeidsforhold() { public List getUnderenheter() { return Optional .ofNullable(model.getUnderenheter()) - .map(value -> value.stream().map(Organisasjon::new).collect(Collectors.toList())) + .map(value -> value.stream().map(Organisasjon::new) + .toList()) .orElse(Collections.emptyList()); } diff --git a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/service/OrganisasjonService.java b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/service/OrganisasjonService.java index 67ef40ec537..7fa2d452af8 100644 --- a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/service/OrganisasjonService.java +++ b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/service/OrganisasjonService.java @@ -2,6 +2,9 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnorge.organisasjonfastedataservice.domain.Organisasjon; +import no.nav.registre.testnorge.organisasjonfastedataservice.repository.OrganisasjonRepository; +import no.nav.testnav.libs.dto.organisasjonfastedataservice.v1.Gruppe; import org.springframework.stereotype.Service; import java.util.List; @@ -9,10 +12,6 @@ import java.util.stream.Collectors; import java.util.stream.StreamSupport; -import no.nav.testnav.libs.dto.organisasjonfastedataservice.v1.Gruppe; -import no.nav.registre.testnorge.organisasjonfastedataservice.domain.Organisasjon; -import no.nav.registre.testnorge.organisasjonfastedataservice.repository.OrganisasjonRepository; - @Slf4j @Service @RequiredArgsConstructor @@ -41,7 +40,7 @@ public List getOrganisasjoner() { var organisasjoner = StreamSupport .stream(list.spliterator(), false) .map(Organisasjon::new) - .collect(Collectors.toList()); + .toList(); log.info("Fant {} organisasjoner.", organisasjoner.size()); return organisasjoner; } diff --git a/apps/organisasjon-forvalter/build.gradle b/apps/organisasjon-forvalter/build.gradle index 417f038c58f..bd40036f0e9 100644 --- a/apps/organisasjon-forvalter/build.gradle +++ b/apps/organisasjon-forvalter/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -56,7 +56,7 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { @@ -86,7 +86,7 @@ dependencies { implementation 'org.postgresql:postgresql' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'ma.glasnost.orika:orika-core:1.5.4' diff --git a/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/LocalConfig.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/LocalConfig.java index 9f3975a3cb7..cedf0baa489 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/LocalConfig.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/LocalConfig.java @@ -13,6 +13,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Slf4j @Configuration @Profile("dev") @@ -36,7 +38,7 @@ public ClientAuthentication clientAuthentication() { System.setProperty(VAULT_PROPERTY, System.getenv("VAULT_TOKEN")); } var token = System.getProperty(VAULT_PROPERTY); - if (token == null) { + if (isBlank(token)) { throw new IllegalArgumentException(String.format("Påkrevet property '%s' er ikke satt.", VAULT_PROPERTY)); } return new TokenAuthentication(System.getProperty(VAULT_PROPERTY)); diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/OrganisasjonOrgnummerServiceConsumer.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/OrganisasjonOrgnummerServiceConsumer.java index 834e20535d1..f90eb46cda9 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/OrganisasjonOrgnummerServiceConsumer.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/OrganisasjonOrgnummerServiceConsumer.java @@ -7,12 +7,10 @@ import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import org.springframework.web.client.HttpClientErrorException; - import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClientResponseException; import java.util.List; -import java.util.stream.Collectors; import java.util.stream.Stream; import static java.lang.String.format; @@ -48,7 +46,8 @@ public List getOrgnummer(Integer antall) { log.info("Orgnummer-service svarte etter {} ms", currentTimeMillis() - startTime); - return Stream.of(response).collect(Collectors.toList()); + return Stream.of(response) + .toList(); } catch (WebClientResponseException e) { log.error(e.getMessage(), e); diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingCommand.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingCommand.java index 40cbc2feab1..ffd06521def 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingCommand.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingCommand.java @@ -45,15 +45,15 @@ public Mono call() { .filter(WebClientFilter::is5xxException)) .doOnError(throwable -> { - log.error(throwable instanceof WebClientResponseException ? - ((WebClientResponseException) throwable).getResponseBodyAsString() : + log.error(throwable instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString() : throwable.getMessage()); BestillingStatus.builder() .uuid(status.getUuid()) .miljoe(status.getMiljoe()) - .feilmelding(throwable instanceof WebClientResponseException ? - ((WebClientResponseException) throwable).getResponseBodyAsString() : + .feilmelding(throwable instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString() : throwable.getMessage()) .build(); }); diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingIdsCommand.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingIdsCommand.java index ebfa8431e2a..2c800f73b28 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingIdsCommand.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingIdsCommand.java @@ -39,8 +39,8 @@ public Mono call() { .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) .doOnError(throwable -> - log.error(throwable instanceof WebClientResponseException ? - ((WebClientResponseException) throwable).getResponseBodyAsString() : + log.error(throwable instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString() : throwable.getMessage())); } } \ No newline at end of file diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingStatusCommand.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingStatusCommand.java index 259d9a93f78..0c2ba7eb14b 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingStatusCommand.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/consumer/command/OrganisasjonBestillingStatusCommand.java @@ -25,23 +25,6 @@ public class OrganisasjonBestillingStatusCommand implements Callable getError(Status status, String description) { - - return Mono.just(BestillingStatus.builder() - .orgnummer(status.getOrganisasjonsnummer()) - .uuid(status.getUuid()) - .miljoe(status.getMiljoe()) - .feilmelding(description) - .build()); - } - @Override public Mono call() { @@ -62,4 +45,21 @@ public Mono call() { .doOnError(throwable -> log.error(getMessage(throwable))) .onErrorResume(throwable -> getError(status, getMessage(throwable))); } + + private static String getMessage(Throwable throwable) { + + return throwable instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString() : + throwable.getMessage(); + } + + private static Mono getError(Status status, String description) { + + return Mono.just(BestillingStatus.builder() + .orgnummer(status.getOrganisasjonsnummer()) + .uuid(status.getUuid()) + .miljoe(status.getMiljoe()) + .feilmelding(description) + .build()); + } } \ No newline at end of file diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/jpa/entity/Status.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/jpa/entity/Status.java index de107ff61d4..f1348a2b68b 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/jpa/entity/Status.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/jpa/entity/Status.java @@ -1,15 +1,5 @@ package no.nav.organisasjonforvalter.jpa.entity; -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Data; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.RequiredArgsConstructor; -import lombok.Setter; -import lombok.ToString; -import org.hibernate.Hibernate; - import jakarta.persistence.Column; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; @@ -17,6 +7,13 @@ import jakarta.persistence.Id; import jakarta.persistence.SequenceGenerator; import jakarta.persistence.Table; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import org.hibernate.Hibernate; + import java.io.Serializable; import java.util.Objects; diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/ClearCacheService.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/ClearCacheService.java index 9dd4eec0491..1621369de70 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/ClearCacheService.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/ClearCacheService.java @@ -12,7 +12,7 @@ @RequiredArgsConstructor public class ClearCacheService { - private final static long EVERY_HOUR = 60 * 60 * 1000L; + private static final long EVERY_HOUR = 60 * 60 * 1000L; private final CacheManager cacheManager; diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/DrivervirksomheterService.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/DrivervirksomheterService.java index 050c0fb1753..ea1aa320eba 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/DrivervirksomheterService.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/DrivervirksomheterService.java @@ -7,7 +7,6 @@ import org.springframework.stereotype.Service; import java.util.List; -import java.util.stream.Collectors; @Service @RequiredArgsConstructor @@ -25,6 +24,6 @@ public List getUnderenheter(String brukerid) { .orgnavn(org.getOrganisasjonsnavn()) .enhetstype(org.getEnhetstype()) .build()) - .collect(Collectors.toList()); + .toList(); } } diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/OrdreService.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/OrdreService.java index 011b30e87a4..0ab17fd6e90 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/OrdreService.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/service/OrdreService.java @@ -55,27 +55,28 @@ public DeployResponse deploy(DeployRequest request) { .orgStatus(organisasjoner.stream() .collect(Collectors.toMap(Organisasjon::getOrganisasjonsnummer, organisasjon -> request.getEnvironments().stream().map(env -> { - String uuid = UUID.randomUUID().toString(); - try { - deployOrganisasjon(uuid, organisasjon, env); - statusRepository.save(Status.builder() - .uuid(uuid) - .organisasjonsnummer(organisasjon.getOrganisasjonsnummer()) - .miljoe(env) - .build()); - return EnvStatus.builder() - .status(OK) - .environment(env) - .build(); - } catch (RuntimeException e) { - log.error(e.getMessage(), e); - return EnvStatus.builder() - .status(ERROR) - .details(e.getMessage()) - .environment(env) - .build(); - } - }).collect(Collectors.toList())))) + String uuid = UUID.randomUUID().toString(); + try { + deployOrganisasjon(uuid, organisasjon, env); + statusRepository.save(Status.builder() + .uuid(uuid) + .organisasjonsnummer(organisasjon.getOrganisasjonsnummer()) + .miljoe(env) + .build()); + return EnvStatus.builder() + .status(OK) + .environment(env) + .build(); + } catch (RuntimeException e) { + log.error(e.getMessage(), e); + return EnvStatus.builder() + .status(ERROR) + .details(e.getMessage()) + .environment(env) + .build(); + } + }) + .toList()))) .build(); } diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/util/CurrentAuthentication.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/util/CurrentAuthentication.java index ea90051c140..6fc4df7c40c 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/util/CurrentAuthentication.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/util/CurrentAuthentication.java @@ -11,14 +11,14 @@ @Slf4j public final class CurrentAuthentication { + public static String getUserId() { + return (String) getToken().getToken().getClaims().get("oid"); + } + private static JwtAuthenticationToken getToken() { return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication()) - .filter(o -> o instanceof JwtAuthenticationToken) + .filter(JwtAuthenticationToken.class::isInstance) .map(JwtAuthenticationToken.class::cast) .orElseThrow(() -> new RuntimeException("Finner ikke Jwt Authentication Token")); } - - public static String getUserId() { - return (String) getToken().getToken().getClaims().get("oid"); - } } \ No newline at end of file diff --git a/apps/organisasjon-mottak-service/build.gradle b/apps/organisasjon-mottak-service/build.gradle index 0096cd7c3b0..b53f44dfcbb 100644 --- a/apps/organisasjon-mottak-service/build.gradle +++ b/apps/organisasjon-mottak-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -79,7 +79,7 @@ dependencies { implementation 'org.apache.kafka:kafka-clients:3.4.0' implementation 'io.confluent:kafka-avro-serializer:7.3.2' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -89,4 +89,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/DevConfig.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/DevConfig.java index 7091309863a..e9f08054e5a 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/DevConfig.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/consumer/JenkinsConsumer.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/consumer/JenkinsConsumer.java index d5ed1442d1e..ee1ca1e3fbf 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/consumer/JenkinsConsumer.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/consumer/JenkinsConsumer.java @@ -10,7 +10,6 @@ import no.nav.testnav.libs.standalone.servletsecurity.exchange.TokenExchange; import org.springframework.core.env.Environment; import org.springframework.stereotype.Component; - import org.springframework.web.reactive.function.client.WebClient; import java.util.Set; @@ -48,7 +47,7 @@ public void send(Flatfil flatFile, String miljo, Set uuids) { var server = env.getProperty("JENKINS_SERVER_" + miljo.toUpperCase()); if (server == null) { - throw new RuntimeException("Finner ikke url for miljo: " + miljo); + throw new IllegalArgumentException("Finner ikke url for miljo: " + miljo); } JenkinsCrumb jenkinsCrumb = new GetCrumbCommand(webClient, accessToken.getTokenValue()).call(); var id = new StartBEREG007Command(webClient, accessToken.getTokenValue(), server, miljo, jenkinsCrumb, flatFile).call(); diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java index a91c8d5b5d6..92ac3f4e787 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/listener/OrganisasjonMottakListener.java @@ -96,7 +96,8 @@ private void createRecords(List records, Organisasjon organisasjon, Orga Optional.ofNullable(parent).ifPresent(value -> list.add(new Knytning(value, organisasjon))); var record = Record.create( - list.stream().map(ToLine::toLine).collect(Collectors.toList()), + list.stream().map(ToLine::toLine) + .toList(), organisasjon.getOrgnummer(), organisasjon.getEnhetstype(), update diff --git a/apps/organisasjon-service/build.gradle b/apps/organisasjon-service/build.gradle index 1940024bd9e..484a191a149 100644 --- a/apps/organisasjon-service/build.gradle +++ b/apps/organisasjon-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,17 +67,17 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'junit:junit:4.13.2' //TODO upgrade to JUnit5 testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'no.nav.testnav.libs:testing' - testImplementation 'org.assertj:assertj-core:3.21.0' + testImplementation 'org.assertj:assertj-core:3.24.2' implementation 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/DevConfig.java b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/DevConfig.java index e8f5b06bb9b..bcfe5880bb2 100644 --- a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/DevConfig.java +++ b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/domain/Organisasjon.java b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/domain/Organisasjon.java index edbcd420a8c..ca69d5e56c9 100644 --- a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/domain/Organisasjon.java +++ b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/domain/Organisasjon.java @@ -2,12 +2,10 @@ import lombok.Value; import lombok.extern.slf4j.Slf4j; +import no.nav.registre.testnorge.organisasjonservice.consumer.dto.OrganisasjonDTO; import java.util.Collections; import java.util.List; -import java.util.stream.Collectors; - -import no.nav.registre.testnorge.organisasjonservice.consumer.dto.OrganisasjonDTO; @Slf4j @@ -31,7 +29,7 @@ public Organisasjon(OrganisasjonDTO dto) { enhetType = dto.getDetaljer().getEnhetstype(); driverVirksomheter = dto.getChildren() != null - ? dto.getChildren().stream().map(OrganisasjonDTO::getOrganisasjonsnummer).collect(Collectors.toList()) + ? dto.getChildren().stream().map(OrganisasjonDTO::getOrganisasjonsnummer).toList() : Collections.emptyList(); if (dto.getOrganisasjonDetaljer() != null) { @@ -54,15 +52,6 @@ public Organisasjon(OrganisasjonDTO dto) { } public no.nav.testnav.libs.dto.organisasjon.v1.OrganisasjonDTO toDTO() { - return no.nav.testnav.libs.dto.organisasjon.v1.OrganisasjonDTO.builder() - .navn(navn) - .enhetType(enhetType) - .orgnummer(orgnummer) - .juridiskEnhet(juridiskEnhet) - .postadresse(postadresse != null ? postadresse.toDTO() : null) - .forretningsadresser(forretningsadresser != null ? forretningsadresser.toDTO() : null) - .redigertnavn(redigertnavn) - .driverVirksomheter(driverVirksomheter) - .build(); + return no.nav.testnav.libs.dto.organisasjon.v1.OrganisasjonDTO.builder().navn(navn).enhetType(enhetType).orgnummer(orgnummer).juridiskEnhet(juridiskEnhet).postadresse(postadresse != null ? postadresse.toDTO() : null).forretningsadresser(forretningsadresser != null ? forretningsadresser.toDTO() : null).redigertnavn(redigertnavn).driverVirksomheter(driverVirksomheter).build(); } } diff --git a/apps/organisasjon-tilgang-frontend/build.gradle b/apps/organisasjon-tilgang-frontend/build.gradle index 232f4fbee91..bda7cdf61e4 100644 --- a/apps/organisasjon-tilgang-frontend/build.gradle +++ b/apps/organisasjon-tilgang-frontend/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -74,7 +74,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:6.6' + implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' @@ -84,4 +84,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/OrganisasjonTilgangFrontendApplicationStarter.java b/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/OrganisasjonTilgangFrontendApplicationStarter.java index 41c1a086a80..0f8f334d9b7 100644 --- a/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/OrganisasjonTilgangFrontendApplicationStarter.java +++ b/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/OrganisasjonTilgangFrontendApplicationStarter.java @@ -28,13 +28,24 @@ OidcInMemorySessionConfiguration.class, FrontendConfig.class }) -@SpringBootApplication(exclude = {ReactiveUserDetailsServiceAutoConfiguration.class}) +@SpringBootApplication(exclude = { ReactiveUserDetailsServiceAutoConfiguration.class }) @RequiredArgsConstructor public class OrganisasjonTilgangFrontendApplicationStarter { private final TestnavOrganisasjonTilgangServiceProperties testnavOrganisasjonTilgangServiceProperties; private final TokenExchange tokenExchange; + @Bean + public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { + return builder + .routes() + .route(createRoute( + testnavOrganisasjonTilgangServiceProperties.getUrl(), + addAuthenticationHeaderFilterFrom(testnavOrganisasjonTilgangServiceProperties) + )) + .build(); + } + public static void main(String[] args) { SpringApplication.run(OrganisasjonTilgangFrontendApplicationStarter.class, args); } @@ -48,17 +59,6 @@ private GatewayFilter addAuthenticationHeaderFilterFrom(ServerProperties serverP }); } - @Bean - public RouteLocator customRouteLocator(RouteLocatorBuilder builder) { - return builder - .routes() - .route(createRoute( - testnavOrganisasjonTilgangServiceProperties.getUrl(), - addAuthenticationHeaderFilterFrom(testnavOrganisasjonTilgangServiceProperties) - )) - .build(); - } - private Function> createRoute(String host, GatewayFilter filter) { return spec -> spec .path("/organisasjon-tilgang-service/**") diff --git a/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/LocalVaultConfig.java b/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/LocalVaultConfig.java index ec52f97d98f..7f582a7da40 100644 --- a/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/LocalVaultConfig.java +++ b/apps/organisasjon-tilgang-frontend/src/main/java/no/nav/testnav/apps/organisasjontilgangfrontend/config/LocalVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/organisasjon-tilgang-service/build.gradle b/apps/organisasjon-tilgang-service/build.gradle index 2ab7c8ae997..9d7d59a4982 100644 --- a/apps/organisasjon-tilgang-service/build.gradle +++ b/apps/organisasjon-tilgang-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -32,7 +32,7 @@ sonarqube { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 bootJar { archiveFileName = "app.jar" @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,8 +68,8 @@ dependencies { implementation 'ma.glasnost.orika:orika-core:1.5.4' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/JacksonConfig.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/JacksonConfig.java index b1d124f456e..7f0f4f61882 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/JacksonConfig.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/JacksonConfig.java @@ -14,6 +14,7 @@ public class JacksonConfig implements WebFluxConfigurer { private final ObjectMapper objectMapper; + @Override public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) { configurer.defaultCodecs().jackson2JsonEncoder( new Jackson2JsonEncoder(objectMapper) diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/LocalVaultConfig.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/LocalVaultConfig.java index 7919a8afa9e..292ad4809c9 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/LocalVaultConfig.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/LocalVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/CreateOrganisasjonAccessCommand.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/CreateOrganisasjonAccessCommand.java index 009332decb4..b7be1545040 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/CreateOrganisasjonAccessCommand.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/CreateOrganisasjonAccessCommand.java @@ -36,7 +36,7 @@ public Mono call() { .bodyToMono(RightDTO[].class) .map(list -> list[0]) .doOnError( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> log.error( "Feil ved opprettelse av organisasjon tilgang i Altinn. \n{}", ((WebClientResponseException) throwable).getResponseBodyAsString() diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java index e5db4dedd23..6f606618158 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/altinn/v1/command/GetRightsCommand.java @@ -34,7 +34,7 @@ public Flux call() { .retrieve() .bodyToFlux(RightDTO.class) .doOnError( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> log.error( "Feil ved henting av rettigheter i Altinn. \n{}", ((WebClientResponseException) throwable).getResponseBodyAsString() diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/MaskinportenConsumer.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/MaskinportenConsumer.java index 1d3b2ffce8c..39aabddfba6 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/MaskinportenConsumer.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/MaskinportenConsumer.java @@ -45,15 +45,7 @@ public MaskinportenConsumer(MaskinportenConfig maskinportenConfig) { ); this.accessToken = cache( wellKnownMono.flatMap(wellKnown -> new GetAccessTokenCommand(webClient, wellKnown, createJwtClaims(wellKnown.issuer())).call()), - value -> Duration.ofSeconds(value.expiresIn() - 10) - ); - } - - private static Mono cache(Mono value, Function ttlForValue) { - return value.cache( - ttlForValue, - throwable -> Duration.ZERO, - () -> Duration.ZERO + value -> Duration.ofSeconds(value.expiresIn() - 10L) ); } @@ -91,4 +83,12 @@ private SignedJWT createSignedJWT(RSAKey rsaJwk, JWTClaimsSet claimsSet) { } } + private static Mono cache(Mono value, Function ttlForValue) { + return value.cache( + ttlForValue, + throwable -> Duration.ZERO, + () -> Duration.ZERO + ); + } + } diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetAccessTokenCommand.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetAccessTokenCommand.java index e058fcd4486..7902064ab0f 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetAccessTokenCommand.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetAccessTokenCommand.java @@ -30,7 +30,7 @@ public Mono call() { .bodyToMono(AccessToken.class) .doOnSuccess(value -> log.info("AccessToken hentet fra maskinporten.")) .doOnError( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> log.error( "Feil ved henting av AccessToken for maskinporten. \n{}", ((WebClientResponseException) throwable).getResponseBodyAsString() diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetWellKnownCommand.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetWellKnownCommand.java index a5be23bf99b..6a59d75058d 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetWellKnownCommand.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/consumer/maskinporten/v1/command/GetWellKnownCommand.java @@ -24,7 +24,7 @@ public Mono call() { .bodyToMono(WellKnown.class) .doOnSuccess(value -> log.info("WellKnown hentet for maskinporten.")) .doOnError( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> log.error( "Feil ved henting av well known for maskinporten. \n{}", ((WebClientResponseException) throwable).getResponseBodyAsString() diff --git a/apps/orgnummer-service/build.gradle b/apps/orgnummer-service/build.gradle index 8cae64f4c0c..e71e7b9f5f1 100644 --- a/apps/orgnummer-service/build.gradle +++ b/apps/orgnummer-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -76,7 +76,7 @@ dependencies { implementation 'com.zaxxer:HikariCP' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.4' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.hibernate.validator:hibernate-validator' @@ -88,4 +88,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties b/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/DevConfig.java b/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/DevConfig.java index cf99db3f549..e7e80722da7 100644 --- a/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/DevConfig.java +++ b/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/oversikt-frontend/build.gradle b/apps/oversikt-frontend/build.gradle index 9eb49959bb9..b9729dc0fa0 100644 --- a/apps/oversikt-frontend/build.gradle +++ b/apps/oversikt-frontend/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' mavenBom 'org.springframework.session:spring-session-bom:2021.2.0' } } @@ -70,7 +70,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -81,4 +81,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java index 2869e75fb2d..86937bfefff 100644 --- a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java +++ b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/config/DevConfig.java @@ -8,6 +8,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @@ -15,6 +17,8 @@ @VaultPropertySource(value = "secret/.common/tokenx/dev/app-1", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -23,12 +27,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/PersonOrganisasjonTilgangConsumer.java b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/PersonOrganisasjonTilgangConsumer.java index 575eb6d26e8..99fa37c188a 100644 --- a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/PersonOrganisasjonTilgangConsumer.java +++ b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/PersonOrganisasjonTilgangConsumer.java @@ -54,7 +54,7 @@ public Mono hasAccess(String organisasjonsnummer) { return tokenExchange.exchange(serviceProperties) .flatMap(accessToken -> new GetPersonOrganisasjonTilgangCommand(webClient, accessToken.getTokenValue(), organisasjonsnummer).call()) .onErrorResume( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> { log.warn("Person har ikke tilgang til organisasjon {}.", organisasjonsnummer); return Mono.empty(); diff --git a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/dto/OrganisasjonDTO.java b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/dto/OrganisasjonDTO.java index 27a3cd617d6..5981ab1ebae 100644 --- a/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/dto/OrganisasjonDTO.java +++ b/apps/oversikt-frontend/src/main/java/no/nav/testnav/apps/oversiktfrontend/consumer/dto/OrganisasjonDTO.java @@ -1,7 +1,5 @@ package no.nav.testnav.apps.oversiktfrontend.consumer.dto; -import com.fasterxml.jackson.annotation.JsonInclude; - import java.time.LocalDateTime; public record OrganisasjonDTO( diff --git a/apps/pdl-forvalter/build.gradle b/apps/pdl-forvalter/build.gradle index 66843b53301..19b23fc5b30 100644 --- a/apps/pdl-forvalter/build.gradle +++ b/apps/pdl-forvalter/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -55,7 +55,7 @@ repositories { } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { @@ -79,13 +79,13 @@ dependencies { implementation 'ma.glasnost.orika:orika-core:1.5.4' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.postgresql:postgresql' implementation 'org.flywaydb:flyway-core' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2' implementation 'org.projectlombok:lombok' diff --git a/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties b/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties +++ b/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/LocalConfig.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/LocalConfig.java index 848290efe3b..9d9e08e3cee 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/LocalConfig.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/LocalConfig.java @@ -11,6 +11,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @Import({ @@ -20,6 +22,8 @@ @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -28,12 +32,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetCommand.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetCommand.java index 2943745fcd8..0bcef61766f 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetCommand.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetCommand.java @@ -23,20 +23,13 @@ public class IdentpoolGetCommand implements Callable> { private static final String IDENTPOOL = "Identpool: "; - private static final String IDENT = "personidentifikator"; + private static final String PERSONIDENTIFIKATOR = "personidentifikator"; private final WebClient webClient; private final String url; private final String ident; private final String token; - protected static String getMessage(Throwable error) { - - return error instanceof WebClientResponseException webClientResponseException ? - webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : - error.getMessage(); - } - @Override public Mono call() { @@ -45,15 +38,15 @@ public Mono call() { .uri(builder -> builder.path(url).build()) .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .header(IDENT, ident) + .header(PERSONIDENTIFIKATOR, ident) .retrieve() .bodyToMono(IdentpoolStatusDTO.class) .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) .filter(WebClientFilter::is5xxException)) .onErrorResume(throwable -> { log.error(getMessage(throwable)); - if (throwable instanceof WebClientResponseException) { - if (((WebClientResponseException) throwable).getStatusCode() == HttpStatus.NOT_FOUND) { + if (throwable instanceof WebClientResponseException webClientResponseException) { + if (webClientResponseException.getStatusCode() == HttpStatus.NOT_FOUND) { return Mono.error(new NotFoundException(IDENTPOOL + getMessage(throwable))); } else { return Mono.error(new InvalidRequestException(IDENTPOOL + getMessage(throwable))); @@ -63,4 +56,11 @@ public Mono call() { } }); } + + protected static String getMessage(Throwable error) { + + return error instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : + error.getMessage(); + } } diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetLedigCommand.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetLedigCommand.java index dac3db6152c..f4d5b6ba81c 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetLedigCommand.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolGetLedigCommand.java @@ -26,20 +26,13 @@ public class IdentpoolGetLedigCommand implements Callable> { private static final String IDENTPOOL = "Identpool: "; - private static final String IDENT = "personidentifikator"; + private static final String PERSONIDENTIFIKATOR = "personidentifikator"; private static final String IS_AVAIL_URL = "/api/v1/identifikator/ledig"; private final WebClient webClient; private final String ident; private final String token; - protected static String getMessage(Throwable error) { - - return error instanceof WebClientResponseException webClientResponseException ? - webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : - error.getMessage(); - } - @Override public Flux call() { @@ -48,7 +41,7 @@ public Flux call() { .uri(builder -> builder.path(IS_AVAIL_URL).build()) .header(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) - .header(IDENT, ident) + .header(PERSONIDENTIFIKATOR, ident) .retrieve() .bodyToFlux(Boolean.class) .map(result -> IdentpoolLedigDTO.builder() @@ -59,8 +52,8 @@ public Flux call() { .filter(WebClientFilter::is5xxException)) .onErrorResume(throwable -> { log.error(getMessage(throwable)); - if (throwable instanceof WebClientResponseException) { - if (((WebClientResponseException) throwable).getStatusCode() == HttpStatus.NOT_FOUND) { + if (throwable instanceof WebClientResponseException exception) { + if (exception.getStatusCode() == HttpStatus.NOT_FOUND) { return Mono.error(new NotFoundException(IDENTPOOL + getMessage(throwable))); } else { return Mono.error(new InvalidRequestException(IDENTPOOL + getMessage(throwable))); @@ -70,4 +63,11 @@ public Flux call() { } }); } + + protected static String getMessage(Throwable error) { + + return error instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : + error.getMessage(); + } } diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostCommand.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostCommand.java index 880b6f2e956..4acd020b303 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostCommand.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostCommand.java @@ -20,7 +20,6 @@ import java.util.Arrays; import java.util.List; import java.util.concurrent.Callable; -import java.util.stream.Collectors; @Slf4j @RequiredArgsConstructor @@ -34,13 +33,6 @@ public class IdentpoolPostCommand implements Callable>> { private final Object body; private final String token; - protected static String getMessage(Throwable error) { - - return error instanceof WebClientResponseException webClientResponseException ? - webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : - error.getMessage(); - } - @Override public Mono> call() { return webClient @@ -51,27 +43,34 @@ public Mono> call() { .header(HttpHeaders.AUTHORIZATION, "Bearer " + token) .retrieve() .bodyToMono(String[].class) - .flatMap(identer -> Mono.just(Arrays.asList(identer).stream() - .map(ident -> IdentDTO.builder() - .ident(ident) - .build()) - .map(IdentDTO.class::cast) - .collect(Collectors.toList()))) - .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) - .filter(WebClientFilter::is5xxException) - .onRetryExhaustedThrow((retryBackoffSpec, retrySignal) -> - new InternalError(IDENTPOOL + "antall repeterende forsøk nådd"))) - .onErrorResume(throwable -> { - log.error(getMessage(throwable)); - if (throwable instanceof WebClientResponseException) { - if (((WebClientResponseException) throwable).getStatusCode() == HttpStatus.NOT_FOUND) { - return Mono.error(new NotFoundException(IDENTPOOL + getMessage(throwable))); - } else { - return Mono.error(new InvalidRequestException(IDENTPOOL + getMessage(throwable))); - } - } else { - return Mono.error(new InternalError(IDENTPOOL + getMessage(throwable))); - } - }); + .flatMap(identer -> Mono.just(Arrays.stream(identer) + .map(ident -> IdentDTO.builder() + .ident(ident) + .build()) + .map(IdentDTO.class::cast) + .toList()) + .retryWhen(Retry.backoff(3, Duration.ofSeconds(5)) + .filter(WebClientFilter::is5xxException) + .onRetryExhaustedThrow((retryBackoffSpec, retrySignal) -> + new InternalError(IDENTPOOL + "antall repeterende forsøk nådd"))) + .onErrorResume(throwable -> { + log.error(getMessage(throwable)); + if (throwable instanceof WebClientResponseException exception) { + if (exception.getStatusCode() == HttpStatus.NOT_FOUND) { + return Mono.error(new NotFoundException(IDENTPOOL + getMessage(throwable))); + } else { + return Mono.error(new InvalidRequestException(IDENTPOOL + getMessage(throwable))); + } + } else { + return Mono.error(new InternalError(IDENTPOOL + getMessage(throwable))); + } + })); + } + + protected static String getMessage(Throwable error) { + + return error instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : + error.getMessage(); } } diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostVoidCommand.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostVoidCommand.java index 0dfd769910d..053f14053c5 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostVoidCommand.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/consumer/command/IdentpoolPostVoidCommand.java @@ -30,13 +30,6 @@ public class IdentpoolPostVoidCommand implements Callable> { private final Object body; private final String token; - protected static String getMessage(Throwable error) { - - return error instanceof WebClientResponseException webClientResponseException ? - webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : - error.getMessage(); - } - @Override public Mono call() { @@ -52,8 +45,8 @@ public Mono call() { .filter(WebClientFilter::is5xxException)) .onErrorResume(throwable -> { log.error(getMessage(throwable)); - if (throwable instanceof WebClientResponseException) { - if (((WebClientResponseException) throwable).getStatusCode() == HttpStatus.NOT_FOUND) { + if (throwable instanceof WebClientResponseException exception) { + if (exception.getStatusCode() == HttpStatus.NOT_FOUND) { return Mono.error(new NotFoundException(IDENTPOOL + getMessage(throwable))); } else { return Mono.error(new InvalidRequestException(IDENTPOOL + getMessage(throwable))); @@ -63,4 +56,11 @@ public Mono call() { } }); } + + protected static String getMessage(Throwable error) { + + return error instanceof WebClientResponseException webClientResponseException ? + webClientResponseException.getResponseBodyAsString(StandardCharsets.UTF_8) : + error.getMessage(); + } } diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/BostedAdresseService.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/BostedAdresseService.java index e4f8101b42f..cb0a0390c13 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/BostedAdresseService.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/service/BostedAdresseService.java @@ -50,12 +50,10 @@ public List convert(PersonDTO person, Boolean relaxed) { for (var adresse : person.getBostedsadresse()) { - if (isTrue(adresse.getIsNew())) { + if (isTrue(adresse.getIsNew()) && (isNotTrue(relaxed))) { + handle(adresse, person); + populateMiscFields(adresse, person); - if (isNotTrue(relaxed)) { - handle(adresse, person); - populateMiscFields(adresse, person); - } } } enforceIntegrity(person.getBostedsadresse()); diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/DatoFraIdentUtility.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/DatoFraIdentUtility.java index a293619cb4f..1e7f2b72bfd 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/DatoFraIdentUtility.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/DatoFraIdentUtility.java @@ -15,8 +15,6 @@ @UtilityClass public class DatoFraIdentUtility { - private static final long MYNDIG = 18; - public static LocalDate getDato(String ident) { var year = parseInt(ident.substring(4, 6)); diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/IdentValidCheck.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/IdentValidCheck.java index d03af4348cd..b956acac4c2 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/IdentValidCheck.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/utils/IdentValidCheck.java @@ -1,7 +1,6 @@ package no.nav.pdl.forvalter.utils; import lombok.experimental.UtilityClass; -import org.apache.commons.lang3.StringUtils; import java.util.Collection; import java.util.Set; @@ -12,8 +11,8 @@ @UtilityClass public class IdentValidCheck { - private static final int[] CHECK_DIGIT_C1 = {3, 7, 6, 1, 8, 9, 4, 5, 2}; - private static final int[] CHECK_DIGIT_C2 = {5, 4, 3, 2, 7, 6, 5, 4, 3, 2}; + private static final int[] CHECK_DIGIT_C1 = { 3, 7, 6, 1, 8, 9, 4, 5, 2 }; + private static final int[] CHECK_DIGIT_C2 = { 5, 4, 3, 2, 7, 6, 5, 4, 3, 2 }; public Set isIdentValid(Collection identer) { diff --git a/apps/person-export-api/build.gradle b/apps/person-export-api/build.gradle index dc1976fcb8b..1661a0b426e 100644 --- a/apps/person-export-api/build.gradle +++ b/apps/person-export-api/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,8 +69,8 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -81,4 +81,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties b/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/VaultConfig.java b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/VaultConfig.java index 13e60c31c07..0ffb01c09bd 100644 --- a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/VaultConfig.java +++ b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/VaultConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @VaultPropertySource(value = "kv/preprod/fss/testnorge-person-export-api/dev", ignoreSecretNotFound = false) public class VaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/person-faste-data-service/build.gradle b/apps/person-faste-data-service/build.gradle index 7802099f79d..9face2e18b8 100644 --- a/apps/person-faste-data-service/build.gradle +++ b/apps/person-faste-data-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,9 +69,9 @@ dependencies { implementation 'com.zaxxer:HikariCP' implementation 'org.postgresql:postgresql' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -82,4 +82,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/DevConfig.java b/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/DevConfig.java index dc2c3dd05e3..5e91a6c938a 100644 --- a/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/DevConfig.java +++ b/apps/person-faste-data-service/src/main/java/no/nav/testnav/personfastedataservice/config/DevConfig.java @@ -8,10 +8,14 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static org.apache.commons.lang3.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -public class DevConfig extends AbstractVaultConfiguration { +public class DevConfig extends AbstractVaultConfiguration { + + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override public VaultEndpoint vaultEndpoint() { @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/person-organisasjon-tilgang-service/build.gradle b/apps/person-organisasjon-tilgang-service/build.gradle index afa1e0bf952..9795f2f0ae6 100644 --- a/apps/person-organisasjon-tilgang-service/build.gradle +++ b/apps/person-organisasjon-tilgang-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -43,7 +43,7 @@ sonarqube { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 bootJar { archiveFileName = "app.jar" @@ -51,7 +51,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -73,7 +73,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2' diff --git a/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/altinn/v1/AltinnClient.java b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/altinn/v1/AltinnClient.java index dfaad4496a5..ee46fe8a4c0 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/altinn/v1/AltinnClient.java +++ b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/altinn/v1/AltinnClient.java @@ -1,6 +1,12 @@ package no.nav.testnav.apps.persontilgangservice.client.altinn.v1; import com.fasterxml.jackson.databind.ObjectMapper; +import no.nav.testnav.apps.persontilgangservice.client.altinn.v1.command.GetPersonAccessCommand; +import no.nav.testnav.apps.persontilgangservice.client.altinn.v1.dto.AccessDTO; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.MaskinportenClient; +import no.nav.testnav.apps.persontilgangservice.config.AltinnConfig; +import no.nav.testnav.apps.persontilgangservice.domain.Access; +import no.nav.testnav.libs.reactivesecurity.action.GetAuthenticatedUserId; import org.springframework.http.codec.json.Jackson2JsonDecoder; import org.springframework.http.codec.json.Jackson2JsonEncoder; import org.springframework.stereotype.Component; @@ -9,14 +15,6 @@ import reactor.core.publisher.Mono; import java.util.Arrays; -import java.util.stream.Collectors; - -import no.nav.testnav.apps.persontilgangservice.client.altinn.v1.command.GetPersonAccessCommand; -import no.nav.testnav.apps.persontilgangservice.client.altinn.v1.dto.AccessDTO; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.MaskinportenClient; -import no.nav.testnav.apps.persontilgangservice.config.AltinnConfig; -import no.nav.testnav.apps.persontilgangservice.domain.Access; -import no.nav.testnav.libs.reactivesecurity.action.GetAuthenticatedUserId; @Component public class AltinnClient { @@ -66,7 +64,7 @@ public Flux getAccess() { .stream(accesses) .filter(AccessDTO::isActive) .map(Access::new) - .collect(Collectors.toList()) + .toList() ).flatMapIterable(list -> list) ); } diff --git a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/MaskinportenClient.java b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/MaskinportenClient.java index e09c16d38ef..e8e640b7220 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/MaskinportenClient.java +++ b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/MaskinportenClient.java @@ -11,6 +11,10 @@ import com.nimbusds.jwt.SignedJWT; import lombok.SneakyThrows; import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.command.GetAccessTokenCommand; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.command.GetWellKnownCommand; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.AccessToken; +import no.nav.testnav.apps.persontilgangservice.config.MaskinportenConfig; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; import reactor.core.publisher.Mono; @@ -21,11 +25,6 @@ import java.util.UUID; import java.util.function.Function; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.command.GetAccessTokenCommand; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.command.GetWellKnownCommand; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.AccessToken; -import no.nav.testnav.apps.persontilgangservice.config.MaskinportenConfig; - @Slf4j @Component public class MaskinportenClient { @@ -43,7 +42,7 @@ public MaskinportenClient(MaskinportenConfig maskinportenConfig) { ); this.accessToken = cache( wellKnownMono.flatMap(wellKnown -> new GetAccessTokenCommand(webClient, wellKnown, createJwtClaims(wellKnown.issuer())).call()), - value -> Duration.ofSeconds(value.expiresIn() - 10) + value -> Duration.ofSeconds(value.expiresIn() - 10L) ); } diff --git a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetAccessTokenCommand.java b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetAccessTokenCommand.java index 8414962c4ff..f1da03d101d 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetAccessTokenCommand.java +++ b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetAccessTokenCommand.java @@ -2,6 +2,8 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.AccessToken; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.WellKnown; import org.springframework.web.reactive.function.BodyInserters; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClientResponseException; @@ -9,9 +11,6 @@ import java.util.concurrent.Callable; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.AccessToken; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.WellKnown; - @Slf4j @RequiredArgsConstructor public class GetAccessTokenCommand implements Callable> { @@ -31,7 +30,7 @@ public Mono call() { .bodyToMono(AccessToken.class) .doOnSuccess(value -> log.info("AccessToken hentet fra maskinporten.")) .doOnError( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> log.error( "Feil ved henting av AccessToken for maskinporten. \n{}", ((WebClientResponseException) throwable).getResponseBodyAsString() diff --git a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetWellKnownCommand.java b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetWellKnownCommand.java index 6e7b606ff3c..41d3a870157 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetWellKnownCommand.java +++ b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/client/maskinporten/v1/command/GetWellKnownCommand.java @@ -2,15 +2,14 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.WellKnown; +import no.nav.testnav.apps.persontilgangservice.config.MaskinportenConfig; import org.springframework.web.reactive.function.client.WebClient; import org.springframework.web.reactive.function.client.WebClientResponseException; import reactor.core.publisher.Mono; import java.util.concurrent.Callable; -import no.nav.testnav.apps.persontilgangservice.client.maskinporten.v1.dto.WellKnown; -import no.nav.testnav.apps.persontilgangservice.config.MaskinportenConfig; - @Slf4j @RequiredArgsConstructor public class GetWellKnownCommand implements Callable> { @@ -25,7 +24,7 @@ public Mono call() { .bodyToMono(WellKnown.class) .doOnSuccess(value -> log.info("WellKnown hentet for maskinporten.")) .doOnError( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> log.error( "Feil ved henting av well known for maskinporten. \n{}", ((WebClientResponseException) throwable).getResponseBodyAsString() diff --git a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/JacksonConfig.java b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/JacksonConfig.java index 8e7e8384dfb..cbc95a05771 100644 --- a/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/JacksonConfig.java +++ b/apps/person-organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/persontilgangservice/config/JacksonConfig.java @@ -14,6 +14,7 @@ public class JacksonConfig implements WebFluxConfigurer { private final ObjectMapper objectMapper; + @Override public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) { configurer.defaultCodecs().jackson2JsonEncoder( new Jackson2JsonEncoder(objectMapper) diff --git a/apps/person-search-service/build.gradle b/apps/person-search-service/build.gradle index f5386bec303..9426de3daa2 100644 --- a/apps/person-search-service/build.gradle +++ b/apps/person-search-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,11 +40,11 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 repositories { mavenCentral() @@ -79,7 +79,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/DevVaultConfig.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/DevVaultConfig.java index 2ce7cc28191..a84522d2c07 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/DevVaultConfig.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/DevVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/IdentifikasjonUtils.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/IdentifikasjonUtils.java index 97049c957ec..bc6be59444f 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/IdentifikasjonUtils.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/service/utils/IdentifikasjonUtils.java @@ -50,7 +50,7 @@ private static void addIdentitetQueries(BoolQueryBuilder queryBuilder, Identifik queryBuilder.must(nestedExistsQuery("hentPerson.utenlandskIdentifikasjonsnummer", METADATA_FIELD, null)); } if (isTrue(search.getIdentHistorikk())) { - queryBuilder.must(nestedExistsQuery("hentPerson.folkeregisteridentifikator", METADATA_FIELD, true)); + queryBuilder.must(nestedExistsQuery(IDENTIFIKATOR_PATH, METADATA_FIELD, true)); } } diff --git a/apps/person-service/build.gradle b/apps/person-service/build.gradle index 1878a54038d..204b801cf6b 100644 --- a/apps/person-service/build.gradle +++ b/apps/person-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,11 +38,11 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 repositories { mavenCentral() @@ -72,7 +72,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.hibernate.validator:hibernate-validator' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' diff --git a/apps/person-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/person-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/DevConfig.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/DevConfig.java index df113783511..4ece9c2898d 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/DevConfig.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/DevConfig.java @@ -8,6 +8,7 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; import static java.lang.String.format; @Configuration @@ -28,8 +29,8 @@ public ClientAuthentication clientAuthentication() { System.setProperty(TOKEN_PROPERTY, System.getenv("VAULT_TOKEN")); } var token = System.getProperty(TOKEN_PROPERTY); - if (token == null) { - throw new IllegalArgumentException(format("Påkreved property '%s' er ikke satt.", TOKEN_PROPERTY)); + if (isBlank(token)) { + throw new IllegalArgumentException(format("påkrevd property '%s' er ikke satt.", TOKEN_PROPERTY)); } return new TokenAuthentication(System.getProperty(TOKEN_PROPERTY)); } diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/JacksonConfig.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/JacksonConfig.java index 983e925d9fb..b77dcd88a18 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/JacksonConfig.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/JacksonConfig.java @@ -14,6 +14,7 @@ public class JacksonConfig implements WebFluxConfigurer { private final ObjectMapper objectMapper; + @Override public void configureHttpMessageCodecs(ServerCodecConfigurer configurer) { configurer.defaultCodecs().jackson2JsonEncoder( new Jackson2JsonEncoder(objectMapper) diff --git a/apps/profil-api/build.gradle b/apps/profil-api/build.gradle index 0381b3b1c33..e57ca5b33c4 100644 --- a/apps/profil-api/build.gradle +++ b/apps/profil-api/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,7 +68,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -81,4 +81,4 @@ dependencies { } description = 'profil-api' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/profil-api/gradle/wrapper/gradle-wrapper.properties b/apps/profil-api/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/profil-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/profil-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/DevConfig.java b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/DevConfig.java index 7d08810bc69..ba4cdb12926 100644 --- a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/DevConfig.java +++ b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/consumer/PersonOrganisasjonTilgangConsumer.java b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/consumer/PersonOrganisasjonTilgangConsumer.java index 06b518d4c43..311c16186b0 100644 --- a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/consumer/PersonOrganisasjonTilgangConsumer.java +++ b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/consumer/PersonOrganisasjonTilgangConsumer.java @@ -50,7 +50,7 @@ public Mono getOrganisasjon(String organisasjonsnummer) { return tokenExchange.exchange(serviceProperties) .flatMap(accessToken -> new GetPersonOrganisasjonTilgangCommand(webClient, accessToken.getTokenValue(), organisasjonsnummer).call()) .onErrorResume( - throwable -> throwable instanceof WebClientResponseException, + WebClientResponseException.class::isInstance, throwable -> { log.warn("Person har ikke tilgang til organisasjon {}.", organisasjonsnummer); return Mono.empty(); diff --git a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/service/ProfilService.java b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/service/ProfilService.java index 9aeda921b5b..e522e02a5aa 100644 --- a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/service/ProfilService.java +++ b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/service/ProfilService.java @@ -16,18 +16,13 @@ @Service @RequiredArgsConstructor public class ProfilService { + private static final String UKJENT = "[ukjent]"; + private static final String BANK_ID = "BankId"; private final AzureAdProfileConsumer azureAdProfileConsumer; private final TokenXResourceServerProperties tokenXResourceServerProperties; private final PersonOrganisasjonTilgangConsumer organisasjonTilgangConsumer; private final GetUserInfo getUserInfo; - private JwtAuthenticationToken getJwtAuthenticationToken() { - return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication()) - .filter(o -> o instanceof JwtAuthenticationToken) - .map(JwtAuthenticationToken.class::cast) - .orElseThrow(); - } - public Profil getProfile() { if (isTokenX()) { return getUserInfo.call().map(userInfo -> @@ -35,26 +30,33 @@ public Profil getProfile() { .getOrganisasjon(userInfo.organisasjonsnummer()) .map(dto -> new Profil( userInfo.brukernavn(), - "[ukjent]", - "[ukjent]", + UKJENT, + UKJENT, dto.navn(), dto.organisasjonsnummer(), - "BankId") + BANK_ID) ).block() ).orElse(new Profil( - "BankId", - "[ukjent]", - "[ukjent]", - "[ukjent]", - "[ukjent]", - "BankId" + BANK_ID, + UKJENT, + UKJENT, + UKJENT, + UKJENT, + BANK_ID )); } return azureAdProfileConsumer.getProfil(); } public Optional getImage() { - return isTokenX() ? Optional.empty() : azureAdProfileConsumer.getProfilImage(); + return isTokenX() ? Optional.empty() : azureAdProfileConsumer.getProfilImage(); + } + + private JwtAuthenticationToken getJwtAuthenticationToken() { + return Optional.ofNullable(SecurityContextHolder.getContext().getAuthentication()) + .filter(JwtAuthenticationToken.class::isInstance) + .map(JwtAuthenticationToken.class::cast) + .orElseThrow(); } private boolean isTokenX() { diff --git a/apps/sykemelding-api/build.gradle b/apps/sykemelding-api/build.gradle index 1e8567eb869..bb1eb91bf5d 100644 --- a/apps/sykemelding-api/build.gradle +++ b/apps/sykemelding-api/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -75,14 +75,14 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.0.3' implementation 'org.springframework.kafka:spring-kafka' implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' - implementation 'jakarta.activation:jakarta.activation-api:2.1.1' + implementation 'jakarta.activation:jakarta.activation-api:2.1.2' implementation 'org.glassfish.jaxb:jaxb-runtime' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' @@ -98,4 +98,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties b/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/DevConfig.java b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/DevConfig.java index 51bbbe1eb83..1343d98171b 100644 --- a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/DevConfig.java +++ b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static org.apache.commons.lang3.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/domain/Sykemelding.java b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/domain/Sykemelding.java index 4706e325efe..4c1bba83796 100644 --- a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/domain/Sykemelding.java +++ b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/domain/Sykemelding.java @@ -95,7 +95,7 @@ public String getMsgId() { } private XMLMsgHead getXMLMsgHead() { - return findObjectFromClass(value -> value instanceof XMLMsgHead); + return findObjectFromClass(XMLMsgHead.class::isInstance); } private void updatePatient(XMLPatient patient, PasientDTO dto) { @@ -165,7 +165,7 @@ private T findObjectFromClass(final FilterInstanceOf filterAction) { } private XMLMottakenhetBlokk getXMLMottakenhetBlokk() { - return findObjectFromClass(value -> value instanceof XMLMottakenhetBlokk); + return findObjectFromClass(XMLMottakenhetBlokk.class::isInstance); } @FunctionalInterface diff --git a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/external/eiFellesformat/ObjectFactory.java b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/external/eiFellesformat/ObjectFactory.java index 31a71618202..dee3b90ee88 100644 --- a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/external/eiFellesformat/ObjectFactory.java +++ b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/external/eiFellesformat/ObjectFactory.java @@ -31,11 +31,11 @@ @XmlRegistry public class ObjectFactory { - private final static QName _SporinformasjonBlokk_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "SporinformasjonBlokk"); - private final static QName _Etternavn_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "Etternavn"); - private final static QName _Fornavn_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "Fornavn"); - private final static QName _Mellomnavn_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "Mellomnavn"); - private final static QName _PostalAddress_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "PostalAddress"); + private static final QName _SporinformasjonBlokk_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "SporinformasjonBlokk"); + private static final QName _Etternavn_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "Etternavn"); + private static final QName _Fornavn_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "Fornavn"); + private static final QName _Mellomnavn_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "Mellomnavn"); + private static final QName _PostalAddress_QNAME = new QName("http://www.trygdeetaten.no/xml/eiff/1/", "PostalAddress"); /** * Create a new ObjectFactory that can be used to create new instances of schema derived classes for package: no.nav.helse.eiFellesformat diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index c9ecab604b6..728d77112dc 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,7 +68,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'no.nav.testnav.libs:testing' @@ -81,4 +81,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties b/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/DevConfig.java b/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/DevConfig.java index c19d9f97f6f..49eb9b2c2be 100644 --- a/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/DevConfig.java +++ b/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/synt-vedtakshistorikk-service/build.gradle b/apps/synt-vedtakshistorikk-service/build.gradle index 339f84bb1e7..b96bd72e151 100644 --- a/apps/synt-vedtakshistorikk-service/build.gradle +++ b/apps/synt-vedtakshistorikk-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -47,7 +47,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'no.nav.testnav.libs:servlet-core' @@ -67,7 +67,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties b/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/DevConfig.java b/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/DevConfig.java index 8564f641ea6..92edf0b889f 100644 --- a/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/DevConfig.java +++ b/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/DevConfig.java @@ -8,12 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/testnav-ident-pool/build.gradle b/apps/testnav-ident-pool/build.gradle index a97f96e0824..8681ada48e9 100644 --- a/apps/testnav-ident-pool/build.gradle +++ b/apps/testnav-ident-pool/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -65,7 +65,7 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'no.nav.testnav.libs:security-core' @@ -97,7 +97,7 @@ dependencies { implementation 'org.postgresql:postgresql' implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties b/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/LocalConfig.java b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/LocalConfig.java index 962b9fcaa1c..bddd823e51b 100644 --- a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/LocalConfig.java +++ b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/LocalConfig.java @@ -11,6 +11,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @Import({ @@ -20,6 +22,8 @@ @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class LocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -28,12 +32,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/meter/PrometheusTagsProvider.java b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/meter/PrometheusTagsProvider.java deleted file mode 100644 index f37a65ae288..00000000000 --- a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/meter/PrometheusTagsProvider.java +++ /dev/null @@ -1,27 +0,0 @@ -package no.nav.testnav.identpool.meter; - -import io.micrometer.core.instrument.Tag; -import org.springframework.boot.actuate.metrics.web.reactive.client.WebClientExchangeTags; -import org.springframework.boot.actuate.metrics.web.reactive.client.WebClientExchangeTagsProvider; -import org.springframework.web.reactive.function.client.ClientRequest; -import org.springframework.web.reactive.function.client.ClientResponse; - -import java.util.List; - -public class PrometheusTagsProvider implements WebClientExchangeTagsProvider { - - private static String stripRequestParams(Tag uriTag) { - - return uriTag.getValue().replaceFirst("\\?.*", ""); - } - - @Override - public Iterable tags(ClientRequest request, ClientResponse response, Throwable throwable) { - - return List.of( - WebClientExchangeTags.method(request), - Tag.of("uri", stripRequestParams(WebClientExchangeTags.uri(request))), - WebClientExchangeTags.status(response, throwable), - WebClientExchangeTags.outcome(response)); - } -} diff --git a/apps/testnorge-bisys/build.gradle b/apps/testnorge-bisys/build.gradle index 10d100168a7..5ba9aed0b4d 100644 --- a/apps/testnorge-bisys/build.gradle +++ b/apps/testnorge-bisys/build.gradle @@ -80,7 +80,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' - implementation 'org.springdoc:springdoc-openapi-ui:1.6.9' + implementation 'org.springdoc:springdoc-openapi-ui:1.6.15' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'com.squareup.okhttp3:okhttp:4.9.3' @@ -96,4 +96,4 @@ dependencies { } description = 'testnorge-bisys' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties b/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java b/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java index fcfab2afd40..e1257044a51 100644 --- a/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java +++ b/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java @@ -8,6 +8,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @@ -21,8 +23,8 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); } diff --git a/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/domain/search/PersonSearch.java b/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/domain/search/PersonSearch.java index 2feafa33e58..85ab0fb79e4 100644 --- a/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/domain/search/PersonSearch.java +++ b/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/domain/search/PersonSearch.java @@ -13,14 +13,14 @@ @Setter @AllArgsConstructor public class PersonSearch { - private final String tag = "TESTNORGE"; + private static final String TAG = "TESTNORGE"; + private static final Boolean KUN_LEVENDE = true; private final List excludeTags = Collections.singletonList("DOLLY"); - private final Boolean kunLevende = true; - + + RelasjonSearch relasjoner; private Integer page; private Integer pageSize; private String randomSeed; private FoedselSearch foedsel; - RelasjonSearch relasjoner; } diff --git a/apps/testnorge-statisk-data-forvalter/build.gradle b/apps/testnorge-statisk-data-forvalter/build.gradle index dfbf10ea21e..7dcd6fa65fe 100644 --- a/apps/testnorge-statisk-data-forvalter/build.gradle +++ b/apps/testnorge-statisk-data-forvalter/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -35,7 +35,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -91,8 +91,8 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.1' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'com.squareup.okhttp3:okhttp:4.9.3' implementation 'org.projectlombok:lombok' @@ -107,4 +107,4 @@ dependencies { } description = 'testnorge-statisk-data-forvalter' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties b/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/adapter/EregTagAdapter.java b/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/adapter/EregTagAdapter.java index db3703c8085..0c52191816b 100644 --- a/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/adapter/EregTagAdapter.java +++ b/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/adapter/EregTagAdapter.java @@ -1,14 +1,12 @@ package no.nav.registre.sdforvalter.adapter; import lombok.RequiredArgsConstructor; -import org.springframework.stereotype.Component; - -import java.util.List; -import java.util.stream.Collectors; - import no.nav.registre.sdforvalter.database.model.EregTagModel; import no.nav.registre.sdforvalter.database.model.TagModel; import no.nav.registre.sdforvalter.database.repository.EregTagRepository; +import org.springframework.stereotype.Component; + +import java.util.List; @Component @RequiredArgsConstructor @@ -26,6 +24,6 @@ public List findAllTagsBy(String orgnr) { .findAllBy(orgnr) .stream() .map(EregTagModel::getTag) - .collect(Collectors.toList()); + .toList(); } } diff --git a/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/config/DevConfig.java b/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/config/DevConfig.java index e7c796e9adb..ca3f27ca4be 100644 --- a/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/config/DevConfig.java +++ b/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "kv/preprod/fss/testnorge-statisk-data-forvalter/local", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) -public class DevConfig extends AbstractVaultConfiguration { +public class DevConfig extends AbstractVaultConfiguration { + + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override public VaultEndpoint vaultEndpoint() { @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/service/AaregService.java b/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/service/AaregService.java index 1926d2e7da7..57c23c24876 100644 --- a/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/service/AaregService.java +++ b/apps/testnorge-statisk-data-forvalter/src/main/java/no/nav/registre/sdforvalter/service/AaregService.java @@ -3,13 +3,13 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import no.nav.registre.sdforvalter.consumer.rs.aareg.AaregConsumer; -import no.nav.registre.sdforvalter.consumer.rs.kodeverk.KodeverkConsumer; import no.nav.registre.sdforvalter.consumer.rs.aareg.SyntAaregConsumer; -import no.nav.registre.sdforvalter.consumer.rs.aareg.response.ArbeidsforholdRespons; import no.nav.registre.sdforvalter.consumer.rs.aareg.request.RsAaregSyntetiseringsRequest; import no.nav.registre.sdforvalter.consumer.rs.aareg.request.RsOrganisasjon; import no.nav.registre.sdforvalter.consumer.rs.aareg.request.RsSyntPerson; import no.nav.registre.sdforvalter.consumer.rs.aareg.request.RsSyntetiskArbeidsforhold; +import no.nav.registre.sdforvalter.consumer.rs.aareg.response.ArbeidsforholdRespons; +import no.nav.registre.sdforvalter.consumer.rs.kodeverk.KodeverkConsumer; import no.nav.registre.sdforvalter.domain.Aareg; import no.nav.registre.sdforvalter.domain.AaregListe; import no.nav.testnav.libs.dto.aareg.v1.Arbeidsforhold; @@ -22,7 +22,6 @@ import java.security.SecureRandom; import java.util.ArrayList; import java.util.List; -import java.util.stream.Collectors; import static java.util.Objects.isNull; import static java.util.Objects.nonNull; @@ -58,7 +57,7 @@ public List sendArbeidsforhold( null, environment) ) - .collect(Collectors.toList()); + .toList(); var total = liste.getListe().size(); var antallNye = nyeArbeidsforhold.size(); diff --git a/apps/testnorge-tp/build.gradle b/apps/testnorge-tp/build.gradle index 8069e54375d..0bda6f97b35 100644 --- a/apps/testnorge-tp/build.gradle +++ b/apps/testnorge-tp/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -65,7 +65,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' @@ -77,4 +77,4 @@ dependencies { } description = 'testnorge-tp' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties b/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/dev/VaultConfig.java b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/dev/VaultConfig.java index 919d01e2f35..be6d944a636 100644 --- a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/dev/VaultConfig.java +++ b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/dev/VaultConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "kv/preprod/fss/testnorge-tp/local", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class VaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/provider/OrkestreringController.java b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/provider/OrkestreringController.java index 43ebabcaa8e..26abbac9a97 100644 --- a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/provider/OrkestreringController.java +++ b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/provider/OrkestreringController.java @@ -14,7 +14,6 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; -import java.util.stream.Collectors; @Slf4j @RestController @@ -41,7 +40,8 @@ public ResponseEntity> addPeople( @RequestBody List fnrs ) { var people = tpService.createPeople(fnrs); - var feilet = fnrs.parallelStream().filter(fnr -> !people.contains(fnr)).collect(Collectors.toList()); + var feilet = fnrs.parallelStream().filter(fnr -> !people.contains(fnr)) + .toList(); return ResponseEntity.ok(feilet); } diff --git a/apps/tilbakemelding-api/build.gradle b/apps/tilbakemelding-api/build.gradle index d739f495a93..b0c5e3c80b7 100644 --- a/apps/tilbakemelding-api/build.gradle +++ b/apps/tilbakemelding-api/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -61,7 +61,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-security' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.hibernate.validator:hibernate-validator' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' @@ -72,7 +72,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.reactivestreams:reactive-streams:1.0.3' + implementation 'org.reactivestreams:reactive-streams:1.0.4' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' @@ -83,4 +83,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties b/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/DevConfig.java b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/DevConfig.java index ce3619d7c03..4bf8d5d5bb2 100644 --- a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/DevConfig.java +++ b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/DevConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "kv/preprod/fss/testnorge-tilbakemelding-api/dev", ignoreSecretNotFound = false) @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/service/TilbakemeldingService.java b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/service/TilbakemeldingService.java index 5a8ce3e82bf..1ab24be2454 100644 --- a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/service/TilbakemeldingService.java +++ b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/service/TilbakemeldingService.java @@ -1,11 +1,10 @@ package no.nav.registre.testnorge.tilbakemeldingapi.service; -import org.springframework.beans.factory.annotation.Value; -import org.springframework.stereotype.Service; - -import no.nav.testnav.libs.slack.consumer.SlackConsumer; import no.nav.registre.testnorge.tilbakemeldingapi.consumer.ProfilApiConsumer; import no.nav.registre.testnorge.tilbakemeldingapi.domain.Tilbakemelding; +import no.nav.testnav.libs.slack.consumer.SlackConsumer; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; @Service public class TilbakemeldingService { @@ -24,7 +23,7 @@ public TilbakemeldingService( } public void publish(Tilbakemelding tilbakemelding) { - String visningsNavn = tilbakemelding.getIsAnonym() + String visningsNavn = Boolean.TRUE.equals(tilbakemelding.getIsAnonym()) ? "Anonym" : profilApiConsumer.getBruker().getVisningsNavn(); slackConsumer.publish(tilbakemelding.toSlackMessage(channel, visningsNavn)); diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index ae14e844162..202e281c90e 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,11 +40,11 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 repositories { mavenLocal() @@ -79,12 +79,12 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' - implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.0.2' - implementation 'com.ibm.icu:icu4j:70.1' + implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.0.3' + implementation 'com.ibm.icu:icu4j:72.1' implementation 'javax.xml.bind:jaxb-api:2.3.1' implementation 'javax.json.bind:javax.json.bind-api:1.0' - implementation 'javax.activation:activation:1.1' + implementation 'javax.activation:activation:1.1.1' implementation 'org.glassfish.jaxb:jaxb-runtime:2.3.0' implementation 'com.sun.xml.bind:jaxb-core:2.3.0.1' implementation 'org.glassfish.jaxb:jaxb-runtime' @@ -101,7 +101,7 @@ dependencies { implementation 'org.aspectj:aspectjweaver:1.9.7' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties b/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/VaultLocalConfig.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/VaultLocalConfig.java index c80173c0647..87bc0194638 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/VaultLocalConfig.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/VaultLocalConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @VaultPropertySource(value = "serviceuser/dev/srvtestnav-tps-messa", propertyNamePrefix = "credentials.mq.", ignoreSecretNotFound = false) public class VaultLocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/factory/HealthConnectionFactory.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/factory/HealthConnectionFactory.java index 476a6f90758..e0fea864f50 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/factory/HealthConnectionFactory.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/factory/HealthConnectionFactory.java @@ -29,7 +29,7 @@ public class HealthConnectionFactory { @Bean @Primary - public UserCredentialsConnectionFactoryAdapter userCredentialsConnectionFactoryAdapter() throws JMSException, JMSException { + public UserCredentialsConnectionFactoryAdapter userCredentialsConnectionFactoryAdapter() throws JMSException { var factory = new MQQueueConnectionFactory(); factory.setCCSID(UTF_8_WITH_PUA); diff --git a/apps/udi-stub/build.gradle b/apps/udi-stub/build.gradle index 51daf033df4..a6616eb1e6d 100644 --- a/apps/udi-stub/build.gradle +++ b/apps/udi-stub/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java' id "uk.co.boothen.gradle.wsimport" version "0.18" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -37,7 +37,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -54,7 +54,7 @@ bootJar { archiveFileName = "app.jar" } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 repositories { mavenCentral() @@ -70,7 +70,7 @@ repositories { } dependencies { - implementation platform('org.testcontainers:testcontainers-bom:1.17.6') + implementation platform('org.testcontainers:testcontainers-bom:1.19.1') implementation 'no.nav.testnav.libs:servlet-core' implementation 'no.nav.testnav.libs:servlet-security' @@ -96,7 +96,7 @@ dependencies { implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties b/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties +++ b/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/udi-stub/src/main/java/no/nav/udistub/config/DevConfig.java b/apps/udi-stub/src/main/java/no/nav/udistub/config/DevConfig.java index e8a1e67d398..3cd1c00c271 100644 --- a/apps/udi-stub/src/main/java/no/nav/udistub/config/DevConfig.java +++ b/apps/udi-stub/src/main/java/no/nav/udistub/config/DevConfig.java @@ -8,6 +8,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @@ -27,7 +29,7 @@ public ClientAuthentication clientAuthentication() { System.setProperty(VAULT_PROPERTY, System.getenv("VAULT_TOKEN")); } var token = System.getProperty(VAULT_PROPERTY); - if (token == null) { + if (isBlank(token)) { throw new IllegalArgumentException(String.format("Påkrevet property '%s' er ikke satt.", VAULT_PROPERTY)); } return new TokenAuthentication(System.getProperty(VAULT_PROPERTY)); diff --git a/apps/varslinger-service/build.gradle b/apps/varslinger-service/build.gradle index e6fd15716e3..52fe8a7d044 100644 --- a/apps/varslinger-service/build.gradle +++ b/apps/varslinger-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -78,7 +78,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -97,4 +97,4 @@ dependencies { } description = 'varslinger-service' -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties b/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/LocalConfig.java b/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/LocalConfig.java index 4f3c9921903..8dc666533e4 100644 --- a/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/LocalConfig.java +++ b/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/LocalConfig.java @@ -9,6 +9,8 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "secret/dolly/lokal", ignoreSecretNotFound = false) @@ -28,8 +30,8 @@ public ClientAuthentication clientAuthentication() { System.setProperty(TOKEN_SYSTEM_PROPERTY, System.getenv("VAULT_TOKEN")); } var token = System.getProperty(TOKEN_SYSTEM_PROPERTY); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } return new TokenAuthentication(System.getProperty(TOKEN_SYSTEM_PROPERTY)); } diff --git a/examples/reactive-rest-example/build.gradle b/examples/reactive-rest-example/build.gradle index 0cd7690bbf1..9050884c186 100644 --- a/examples/reactive-rest-example/build.gradle +++ b/examples/reactive-rest-example/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -66,7 +66,7 @@ dependencies { runtimeOnly 'org.postgresql:postgresql' runtimeOnly 'com.h2database:h2' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' @@ -74,4 +74,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties b/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties +++ b/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/LocalConfig.java b/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/LocalConfig.java index 438f50c210a..46dbfaecc98 100644 --- a/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/LocalConfig.java +++ b/examples/reactive-rest-example/src/main/java/no/nav/testnav/examples/reactiverestexample/config/LocalConfig.java @@ -8,11 +8,14 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("local") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class LocalConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; @Override public VaultEndpoint vaultEndpoint() { @@ -22,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index d96457295cb..a35053677cc 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/avro-schema/build.gradle b/libs/avro-schema/build.gradle index 185929dc895..23aa2ba2ecc 100644 --- a/libs/avro-schema/build.gradle +++ b/libs/avro-schema/build.gradle @@ -20,7 +20,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 publishing { repositories { diff --git a/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties b/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties +++ b/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/commands/build.gradle b/libs/commands/build.gradle index e251133cd34..bb82f60a560 100644 --- a/libs/commands/build.gradle +++ b/libs/commands/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation "no.nav.testnav.libs:data-transfer-objects" diff --git a/libs/commands/gradle/wrapper/gradle-wrapper.properties b/libs/commands/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/commands/gradle/wrapper/gradle-wrapper.properties +++ b/libs/commands/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/csv-converter/build.gradle b/libs/csv-converter/build.gradle index 51041f3fff6..88b8805c110 100644 --- a/libs/csv-converter/build.gradle +++ b/libs/csv-converter/build.gradle @@ -41,10 +41,10 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { - implementation 'org.apache.commons:commons-csv:1.9.0' + implementation 'org.apache.commons:commons-csv:1.10.0' implementation 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' diff --git a/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties b/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties +++ b/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/data-transfer-objects/build.gradle b/libs/data-transfer-objects/build.gradle index 4a2f25b5424..5ed8874ee7c 100644 --- a/libs/data-transfer-objects/build.gradle +++ b/libs/data-transfer-objects/build.gradle @@ -73,7 +73,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 publishing { repositories { diff --git a/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties b/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties +++ b/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/aareg/v1/ArbeidsgiverArbeidsforhold.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/aareg/v1/ArbeidsgiverArbeidsforhold.java index ee87e07d1ed..54d8209390e 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/aareg/v1/ArbeidsgiverArbeidsforhold.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/aareg/v1/ArbeidsgiverArbeidsforhold.java @@ -12,10 +12,10 @@ @NoArgsConstructor @AllArgsConstructor @Builder -@Schema(description = "" + - "Resultatobjekt for finn-arbeidsforhold-per-arbeidsgiver\n" + - "En tom liste og antall > 0 betyr at søket gir for mange treff\n" + - "Arbeidsforhold er filtrert grunnet tilgangskontroll hvis størrelse på liste er mindre enn (total) antall" +@Schema(description = """ + Resultatobjekt for finn-arbeidsforhold-per-arbeidsgiver + En tom liste og antall > 0 betyr at søket gir for mange treff + Arbeidsforhold er filtrert grunnet tilgangskontroll hvis størrelse på liste er mindre enn (total) antall""" ) public class ArbeidsgiverArbeidsforhold { diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/AdresseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/AdresseDTO.java index 65492412be9..f94714b6773 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/AdresseDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/AdresseDTO.java @@ -2,7 +2,6 @@ import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/NavnDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/NavnDTO.java index d46a43ee5ab..8ab2891677a 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/NavnDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/eregmapper/v1/NavnDTO.java @@ -2,7 +2,6 @@ import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/inntektsmeldinggeneratorservice/v1/rs/RsAvsendersystem.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/inntektsmeldinggeneratorservice/v1/rs/RsAvsendersystem.java index 611e5ecf210..47ebe8913bd 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/inntektsmeldinggeneratorservice/v1/rs/RsAvsendersystem.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/inntektsmeldinggeneratorservice/v1/rs/RsAvsendersystem.java @@ -8,7 +8,6 @@ import java.time.LocalDateTime; import java.util.Objects; -import java.util.Optional; @Getter @Builder diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/organiasjonbestilling/v2/StatusDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/organiasjonbestilling/v2/StatusDTO.java index 491e3d33d31..d56d4e14ed5 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/organiasjonbestilling/v2/StatusDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/organiasjonbestilling/v2/StatusDTO.java @@ -19,23 +19,14 @@ public StatusDTO(Status status) { } private static String getDescription(Status status) { - switch (status) { - case ERROR: - return "Ukjent feil"; - case FAILED: - return "Ukjent kristisk feil"; - case RUNNING: - return "Bestillingen blir prosessert av EREG"; - case COMPLETED: - return "Bestilling er fullført"; - case NOT_FOUND: - return "Finner ikke bestilling. Loggene kan ha blitt slettet"; - case ADDING_TO_QUEUE: - return "Bestillingen venter på tildeling av plass i køen"; - case IN_QUEUE_WAITING_TO_START: - return "Bestillingen venter i køen"; - default: - return null; - } + return switch (status) { + case ERROR -> "Ukjent feil"; + case FAILED -> "Ukjent kristisk feil"; + case RUNNING -> "Bestillingen blir prosessert av EREG"; + case COMPLETED -> "Bestilling er fullført"; + case NOT_FOUND -> "Finner ikke bestilling. Loggene kan ha blitt slettet"; + case ADDING_TO_QUEUE -> "Bestillingen venter på tildeling av plass i køen"; + case IN_QUEUE_WAITING_TO_START -> "Bestillingen venter i køen"; + }; } } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java index 469e83e046b..67de152710e 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/pdlforvalter/v1/SikkerhetstiltakDTO.java @@ -36,10 +36,10 @@ public enum Tiltakstype {FYUS, TFUS, FTUS, DIUS, TOAN} @AllArgsConstructor public static class Kontaktperson implements Serializable { - @Schema(description = "NAV ident, (bokstav + 6 sifre", required = true, example = "Z9999999") + @Schema(description = "NAV ident, (bokstav + 6 sifre", requiredMode = Schema.RequiredMode.REQUIRED, example = "Z9999999") private String personident; - @Schema(description = "NAV enhet (4 sifre)", required = true) + @Schema(description = "NAV enhet (4 sifre)", requiredMode = Schema.RequiredMode.REQUIRED) private String enhet; } } \ No newline at end of file diff --git a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/sykemelding/v1/DiagnoseDTO.java b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/sykemelding/v1/DiagnoseDTO.java index dba9c9be938..18ebbed0794 100644 --- a/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/sykemelding/v1/DiagnoseDTO.java +++ b/libs/data-transfer-objects/src/main/java/no/nav/testnav/libs/dto/sykemelding/v1/DiagnoseDTO.java @@ -3,7 +3,6 @@ import com.fasterxml.jackson.annotation.JsonProperty; import lombok.AllArgsConstructor; import lombok.Builder; -import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.Value; diff --git a/libs/database/build.gradle b/libs/database/build.gradle index 665d3647c7a..b79ea03ca3f 100644 --- a/libs/database/build.gradle +++ b/libs/database/build.gradle @@ -30,7 +30,7 @@ dependencyManagement { applyMavenExclusions = false imports { mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' diff --git a/libs/database/gradle/wrapper/gradle-wrapper.properties b/libs/database/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/database/gradle/wrapper/gradle-wrapper.properties +++ b/libs/database/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/domain/build.gradle b/libs/domain/build.gradle index 487fc271f3c..78f4f0b8b4e 100644 --- a/libs/domain/build.gradle +++ b/libs/domain/build.gradle @@ -41,13 +41,13 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310' + implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2' implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' implementation 'io.springfox:springfox-swagger2:3.0.0' diff --git a/libs/domain/gradle/wrapper/gradle-wrapper.properties b/libs/domain/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/domain/gradle/wrapper/gradle-wrapper.properties +++ b/libs/domain/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/domain/src/main/java/no/nav/testnav/libs/domain/dto/skd/v1/MeldingStatusDTO.java b/libs/domain/src/main/java/no/nav/testnav/libs/domain/dto/skd/v1/MeldingStatusDTO.java index 462f7a5a816..0cccd90e138 100644 --- a/libs/domain/src/main/java/no/nav/testnav/libs/domain/dto/skd/v1/MeldingStatusDTO.java +++ b/libs/domain/src/main/java/no/nav/testnav/libs/domain/dto/skd/v1/MeldingStatusDTO.java @@ -2,7 +2,6 @@ import com.fasterxml.jackson.annotation.JsonIgnoreProperties; import com.fasterxml.jackson.annotation.JsonProperty; -import io.swagger.annotations.ApiModelProperty; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; diff --git a/libs/integration-test/build.gradle b/libs/integration-test/build.gradle index b2cea4968b0..d8290483ebc 100644 --- a/libs/integration-test/build.gradle +++ b/libs/integration-test/build.gradle @@ -49,7 +49,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/libs/integration-test/gradle/wrapper/gradle-wrapper.properties b/libs/integration-test/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/integration-test/gradle/wrapper/gradle-wrapper.properties +++ b/libs/integration-test/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/kafka-config/build.gradle b/libs/kafka-config/build.gradle index 8baebd2e844..045afff8024 100644 --- a/libs/kafka-config/build.gradle +++ b/libs/kafka-config/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' diff --git a/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties b/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties +++ b/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/kafka-producers/build.gradle b/libs/kafka-producers/build.gradle index 72d50a9ee2d..22592b9e13d 100644 --- a/libs/kafka-producers/build.gradle +++ b/libs/kafka-producers/build.gradle @@ -43,7 +43,7 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { diff --git a/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties b/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties +++ b/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-core/build.gradle b/libs/reactive-core/build.gradle index 7612f4a5808..48b9bcf034b 100644 --- a/libs/reactive-core/build.gradle +++ b/libs/reactive-core/build.gradle @@ -51,7 +51,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 publishing { repositories { diff --git a/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-frontend/build.gradle b/libs/reactive-frontend/build.gradle index 01f3e1025fb..91d7552539c 100644 --- a/libs/reactive-frontend/build.gradle +++ b/libs/reactive-frontend/build.gradle @@ -39,7 +39,7 @@ repositories { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' } } @@ -49,7 +49,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 publishing { repositories { diff --git a/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-proxy/build.gradle b/libs/reactive-proxy/build.gradle index 8d8d8bbadb4..a16167c7cbb 100644 --- a/libs/reactive-proxy/build.gradle +++ b/libs/reactive-proxy/build.gradle @@ -38,7 +38,7 @@ repositories { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' } } @@ -47,7 +47,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 publishing { repositories { diff --git a/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/DevConfig.java b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/DevConfig.java index db2c848df70..a6e8c53ba59 100644 --- a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/DevConfig.java +++ b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/DevConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class DevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/filter/MonoRequestBuilder.java b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/filter/MonoRequestBuilder.java index b6b3f3ac19c..e0ef95b8d96 100644 --- a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/filter/MonoRequestBuilder.java +++ b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/filter/MonoRequestBuilder.java @@ -1,7 +1,6 @@ package no.nav.testnav.libs.reactiveproxy.filter; import org.springframework.http.server.reactive.ServerHttpRequest; -import org.springframework.web.server.ServerWebExchange; import reactor.core.publisher.Mono; @FunctionalInterface diff --git a/libs/reactive-security/build.gradle b/libs/reactive-security/build.gradle index 9dc8d62b938..d984bb9c2ad 100644 --- a/libs/reactive-security/build.gradle +++ b/libs/reactive-security/build.gradle @@ -43,7 +43,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 publishing { repositories { diff --git a/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenExchange.java b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenExchange.java index a697ba404a6..de56bafa6d8 100644 --- a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenExchange.java +++ b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/TokenExchange.java @@ -72,7 +72,7 @@ public Mono exchange(ServerProperties serverProperties) { private boolean expires(AccessToken accessToken) { var chunks = accessToken.getTokenValue().split("\\."); - var body = new String(Base64.getDecoder().decode(chunks[1])); + var body = Base64.getDecoder().decode(chunks[1]); return Instant.ofEpochSecond(objectMapper.readTree(body).get("exp").asInt()) .minusSeconds(300) diff --git a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/azuread/TrygdeetatenAzureAdTokenService.java b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/azuread/TrygdeetatenAzureAdTokenService.java index 31576c5770b..4fbaf171d02 100644 --- a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/azuread/TrygdeetatenAzureAdTokenService.java +++ b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/exchange/azuread/TrygdeetatenAzureAdTokenService.java @@ -105,7 +105,7 @@ public Mono exchange(ServerProperties serverProperties) { private boolean expires(AccessToken accessToken) { var chunks = accessToken.getTokenValue().split("\\."); - var body = new String(Base64.getDecoder().decode(chunks[1])); + var body = Base64.getDecoder().decode(chunks[1]); return Instant.ofEpochSecond(objectMapper.readTree(body).get("exp").asInt()) .minusSeconds(300) diff --git a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/manager/JwtReactiveAuthenticationManager.java b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/manager/JwtReactiveAuthenticationManager.java index 3a1a27209d7..6e4cf00bb79 100644 --- a/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/manager/JwtReactiveAuthenticationManager.java +++ b/libs/reactive-security/src/main/java/no/nav/testnav/libs/reactivesecurity/manager/JwtReactiveAuthenticationManager.java @@ -29,7 +29,7 @@ public class JwtReactiveAuthenticationManager implements ReactiveAuthenticationM private final GetJwtDecoder getJwtDecoder; - private Converter> jwtAuthenticationConverter = + private final Converter> jwtAuthenticationConverter = new ReactiveJwtAuthenticationConverterAdapter(new JwtAuthenticationConverter()); public JwtReactiveAuthenticationManager( @@ -47,7 +47,7 @@ public JwtReactiveAuthenticationManager( @Override public Mono authenticate(Authentication authentication) { return Mono.justOrEmpty(authentication) - .filter((a) -> a instanceof BearerTokenAuthenticationToken) + .filter(BearerTokenAuthenticationToken.class::isInstance) .cast(BearerTokenAuthenticationToken.class) .map(BearerTokenAuthenticationToken::getToken) .flatMap(token -> getJwtDecoder.from(parse(token)).decode(token)) diff --git a/libs/reactive-session-security/build.gradle b/libs/reactive-session-security/build.gradle index f023f9873dd..2fc10070cd8 100644 --- a/libs/reactive-session-security/build.gradle +++ b/libs/reactive-session-security/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'com.auth0:java-jwt:4.3.0' diff --git a/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/domain/idporten/WellKnownConfig.java b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/domain/idporten/WellKnownConfig.java index e0210ba4a46..70fe14edafd 100644 --- a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/domain/idporten/WellKnownConfig.java +++ b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/domain/idporten/WellKnownConfig.java @@ -8,8 +8,6 @@ import lombok.ToString; import lombok.Value; -import java.util.List; - @Value @Builder @ToString diff --git a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/exchange/TokenExchange.java b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/exchange/TokenExchange.java index f18950a741f..b3bc26cffb4 100644 --- a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/exchange/TokenExchange.java +++ b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/exchange/TokenExchange.java @@ -76,7 +76,7 @@ private String getUser(SecurityContext context) { private boolean expires(AccessToken accessToken) { var chunks = accessToken.getTokenValue().split("\\."); - var body = new String(Base64.getDecoder().decode(chunks[1])); + var body = Base64.getDecoder().decode(chunks[1]); return Instant.ofEpochSecond(objectMapper.readTree(body).get("exp").asInt()) .minusSeconds(300) diff --git a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/manager/WebClientReactiveTokenResponseClient.java b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/manager/WebClientReactiveTokenResponseClient.java index ba99c68e538..07a50085d2c 100644 --- a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/manager/WebClientReactiveTokenResponseClient.java +++ b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/manager/WebClientReactiveTokenResponseClient.java @@ -33,7 +33,7 @@ public Mono getTokenResponse(OAuth2AuthorizationCodeG Assert.notNull(grantRequest, "grantRequest cannot be null"); return Mono.defer(() -> this.webClient.post() .uri(clientRegistration(grantRequest).getProviderDetails().getTokenUri()) - .headers((headers) -> populateTokenRequestHeaders(grantRequest, headers)) + .headers(headers -> populateTokenRequestHeaders(grantRequest, headers)) .body(createTokenRequestBody(grantRequest)) .exchangeToMono(clientResponse -> readTokenResponse(grantRequest, clientResponse)) ); @@ -105,7 +105,7 @@ private BodyInserters.FormInserter createTokenRequestBody(OAuth2Authoriz private Mono readTokenResponse(OAuth2AuthorizationCodeGrantRequest grantRequest, ClientResponse response) { return response.body(OAuth2BodyExtractors.oauth2AccessTokenResponse()) - .map((tokenResponse) -> populateTokenResponse(grantRequest, tokenResponse)); + .map(tokenResponse -> populateTokenResponse(grantRequest, tokenResponse)); } private OAuth2AccessTokenResponse populateTokenResponse(OAuth2AuthorizationCodeGrantRequest grantRequest, OAuth2AccessTokenResponse tokenResponse) { diff --git a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/resolver/Oauth2AuthenticationToken.java b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/resolver/Oauth2AuthenticationToken.java index 2bb18aeb8eb..21c71f3ae3f 100644 --- a/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/resolver/Oauth2AuthenticationToken.java +++ b/libs/reactive-session-security/src/main/java/no/nav/testnav/libs/reactivesessionsecurity/resolver/Oauth2AuthenticationToken.java @@ -4,6 +4,7 @@ import org.springframework.security.authentication.CredentialsExpiredException; import org.springframework.security.core.Authentication; import org.springframework.security.oauth2.client.authentication.OAuth2AuthenticationToken; +import org.springframework.security.oauth2.core.OAuth2AuthenticationException; import reactor.core.publisher.Mono; @Slf4j @@ -11,10 +12,10 @@ abstract class Oauth2AuthenticationToken { Mono oauth2AuthenticationToken(Mono authentication) { return authentication .map(auth -> { - if (auth instanceof OAuth2AuthenticationToken) { - return (OAuth2AuthenticationToken) auth; + if (auth instanceof OAuth2AuthenticationToken authenticationToken) { + return authenticationToken; } - throw new RuntimeException("Auth er ikke av type Oauth2AuthenticationToken"); + throw new OAuth2AuthenticationException("Auth er ikke av type Oauth2AuthenticationToken"); }) .doOnError(throwable -> log.error("Feilet med å hente accessToken", throwable)) .doOnSuccess(oAuth2AuthenticationToken -> { diff --git a/libs/security-core/build.gradle b/libs/security-core/build.gradle index 854f47ee17b..9ce929345ac 100644 --- a/libs/security-core/build.gradle +++ b/libs/security-core/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 tasks.named('compileJava') { inputs.files(tasks.named('processResources')) diff --git a/libs/security-core/gradle/wrapper/gradle-wrapper.properties b/libs/security-core/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/security-core/gradle/wrapper/gradle-wrapper.properties +++ b/libs/security-core/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/security-token-service/build.gradle b/libs/security-token-service/build.gradle index f8c3a3e4467..2a004f6b95d 100644 --- a/libs/security-token-service/build.gradle +++ b/libs/security-token-service/build.gradle @@ -39,7 +39,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'org.projectlombok:lombok' diff --git a/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties b/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties +++ b/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-core/build.gradle b/libs/servlet-core/build.gradle index 170a631a950..7803f6c2a6a 100644 --- a/libs/servlet-core/build.gradle +++ b/libs/servlet-core/build.gradle @@ -45,11 +45,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.8' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-actuator' diff --git a/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties b/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties +++ b/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-insecure-security/build.gradle b/libs/servlet-insecure-security/build.gradle index 0da97c857bc..fc83af83813 100644 --- a/libs/servlet-insecure-security/build.gradle +++ b/libs/servlet-insecure-security/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { diff --git a/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties b/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/decoder/MultipleIssuersJwtDecoder.java b/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/decoder/MultipleIssuersJwtDecoder.java index 9b063505db0..dc2aa30a19c 100644 --- a/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/decoder/MultipleIssuersJwtDecoder.java +++ b/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/decoder/MultipleIssuersJwtDecoder.java @@ -59,7 +59,7 @@ private OAuth2TokenValidator oAuth2TokenValidator(ResourceServerProperties token.getAudience().stream().anyMatch(audience -> properties.getAcceptedAudience().contains(audience)) ? OAuth2TokenValidatorResult.success() : OAuth2TokenValidatorResult.failure(createError( - String.format("Fant ikke påkreved audience %s i tokenet.", properties.getAcceptedAudience()) + String.format("Fant ikke påkrevd audience %s i tokenet.", properties.getAcceptedAudience()) )); return new DelegatingOAuth2TokenValidator<>(issuerValidator, audienceValidator); } diff --git a/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/exchange/TokenExchange.java b/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/exchange/TokenExchange.java index 465a973c26d..84f32d706ab 100644 --- a/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/exchange/TokenExchange.java +++ b/libs/servlet-insecure-security/src/main/java/no/nav/testnav/libs/standalone/servletsecurity/exchange/TokenExchange.java @@ -50,7 +50,7 @@ public Mono exchange(ServerProperties serverProperties) { private boolean expires(AccessToken accessToken) { var chunks = accessToken.getTokenValue().split("\\."); - var body = new String(Base64.getDecoder().decode(chunks[1])); + var body = Base64.getDecoder().decode(chunks[1]); return Instant.ofEpochSecond(objectMapper.readTree(body).get("exp").asInt()) .minusSeconds(300) diff --git a/libs/servlet-security/build.gradle b/libs/servlet-security/build.gradle index 139b996a658..3111e996c1c 100644 --- a/libs/servlet-security/build.gradle +++ b/libs/servlet-security/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { diff --git a/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties b/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/decoder/MultipleIssuersJwtDecoder.java b/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/decoder/MultipleIssuersJwtDecoder.java index be378d9341f..50cbcf76807 100644 --- a/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/decoder/MultipleIssuersJwtDecoder.java +++ b/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/decoder/MultipleIssuersJwtDecoder.java @@ -57,7 +57,7 @@ private OAuth2TokenValidator oAuth2TokenValidator(ResourceServerProperties token.getAudience().stream().anyMatch(audience -> properties.getAcceptedAudience().contains(audience)) ? OAuth2TokenValidatorResult.success() : OAuth2TokenValidatorResult.failure(createError( - String.format("Fant ikke påkreved audience %s i tokenet.", properties.getAcceptedAudience()) + String.format("Fant ikke påkrevd audience %s i tokenet.", properties.getAcceptedAudience()) )); return new DelegatingOAuth2TokenValidator<>(issuerValidator, audienceValidator); } diff --git a/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/exchange/TokenExchange.java b/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/exchange/TokenExchange.java index b8161476117..05c9688eac2 100644 --- a/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/exchange/TokenExchange.java +++ b/libs/servlet-security/src/main/java/no/nav/testnav/libs/servletsecurity/exchange/TokenExchange.java @@ -68,7 +68,7 @@ public Mono exchange(ServerProperties serverProperties) { private boolean expires(AccessToken accessToken) { var chunks = accessToken.getTokenValue().split("\\."); - var body = new String(Base64.getDecoder().decode(chunks[1])); + var body = Base64.getDecoder().decode(chunks[1]); return Instant.ofEpochSecond(objectMapper.readTree(body).get("exp").asInt()) .minusSeconds(300) diff --git a/libs/slack/build.gradle b/libs/slack/build.gradle index c80d8507b7e..b9764683121 100644 --- a/libs/slack/build.gradle +++ b/libs/slack/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/libs/slack/gradle/wrapper/gradle-wrapper.properties b/libs/slack/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/slack/gradle/wrapper/gradle-wrapper.properties +++ b/libs/slack/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/slack/src/main/java/no/nav/testnav/libs/slack/dto/SlackResponse.java b/libs/slack/src/main/java/no/nav/testnav/libs/slack/dto/SlackResponse.java index 4ed4fb77604..21b38c27966 100644 --- a/libs/slack/src/main/java/no/nav/testnav/libs/slack/dto/SlackResponse.java +++ b/libs/slack/src/main/java/no/nav/testnav/libs/slack/dto/SlackResponse.java @@ -1,7 +1,6 @@ package no.nav.testnav.libs.slack.dto; import com.fasterxml.jackson.annotation.JsonIgnoreProperties; -import com.fasterxml.jackson.annotation.JsonInclude; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.NoArgsConstructor; diff --git a/libs/testing/build.gradle b/libs/testing/build.gradle index 21a4cc931c8..1f706e3fb08 100644 --- a/libs/testing/build.gradle +++ b/libs/testing/build.gradle @@ -37,12 +37,12 @@ repositories { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' } } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { implementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/libs/testing/gradle/wrapper/gradle-wrapper.properties b/libs/testing/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/libs/testing/gradle/wrapper/gradle-wrapper.properties +++ b/libs/testing/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/testing/src/main/java/no/nav/testnav/libs/testing/JsonWiremockHelper.java b/libs/testing/src/main/java/no/nav/testnav/libs/testing/JsonWiremockHelper.java index 25cb3c3f724..ceea39c5357 100644 --- a/libs/testing/src/main/java/no/nav/testnav/libs/testing/JsonWiremockHelper.java +++ b/libs/testing/src/main/java/no/nav/testnav/libs/testing/JsonWiremockHelper.java @@ -1,5 +1,20 @@ package no.nav.testnav.libs.testing; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.ObjectMapper; +import com.github.tomakehurst.wiremock.client.MappingBuilder; +import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder; +import com.github.tomakehurst.wiremock.matching.UrlPathPattern; +import org.springframework.http.HttpHeaders; +import org.springframework.http.HttpStatus; +import org.springframework.http.MediaType; + +import java.util.Arrays; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Map; +import java.util.Set; + import static com.github.tomakehurst.wiremock.client.ResponseDefinitionBuilder.responseDefinition; import static com.github.tomakehurst.wiremock.client.WireMock.aResponse; import static com.github.tomakehurst.wiremock.client.WireMock.delete; @@ -16,39 +31,19 @@ import static com.github.tomakehurst.wiremock.client.WireMock.urlPathMatching; import static com.github.tomakehurst.wiremock.client.WireMock.verify; -import com.fasterxml.jackson.core.JsonProcessingException; -import com.fasterxml.jackson.databind.ObjectMapper; -import com.github.tomakehurst.wiremock.client.MappingBuilder; -import com.github.tomakehurst.wiremock.matching.RequestPatternBuilder; -import com.github.tomakehurst.wiremock.matching.UrlPathPattern; -import org.springframework.http.HttpHeaders; -import org.springframework.http.HttpStatus; -import org.springframework.http.MediaType; - -import java.util.Arrays; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Map; -import java.util.Set; - public class JsonWiremockHelper { private final ObjectMapper mapper; - + private final Set requestFieldsToIgnore = new HashSet<>(); + private final Map queryParamMap = new HashMap<>(); private UrlPathPattern urlPathPattern; private String requestBody; private String responseBody; - private final Set requestFieldsToIgnore = new HashSet<>(); - private final Map queryParamMap = new HashMap<>(); private JsonWiremockHelper(ObjectMapper mapper) { this.mapper = mapper; } - public static JsonWiremockHelper builder(ObjectMapper mapper) { - return new JsonWiremockHelper(mapper); - } - public JsonWiremockHelper withUrlPathMatching(String urlPathMatching) { this.urlPathPattern = urlPathMatching(urlPathMatching); return this; @@ -59,7 +54,6 @@ public JsonWiremockHelper withQueryParam(String name, String value) { return this; } - public JsonWiremockHelper withResponseBody(Object responseBody) throws JsonProcessingException { this.responseBody = mapper.writeValueAsString(responseBody); return this; @@ -80,7 +74,6 @@ public void stubPost(HttpStatus status) { ); } - public void stubPut() { stubFor(updateMappingBuilder(put(urlPathPattern))); } @@ -125,22 +118,6 @@ public void stubDelete() { stubFor(updateMappingBuilder(delete(urlPathPattern))); } - private MappingBuilder updateMappingBuilder(MappingBuilder mappingBuilder) { - queryParamMap.forEach((name, value) -> mappingBuilder.withQueryParam(name, equalTo(value))); - - if (requestBody != null) { - mappingBuilder.withRequestBody(equalToJson(requestBody)); - } - - if (responseBody != null) { - mappingBuilder.willReturn(aResponse() - .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) - .withBody(responseBody) - ); - } - return mappingBuilder; - } - public void verifyDelete() { RequestPatternBuilder requestPatternBuilder = deleteRequestedFor(urlPathPattern); if (requestBody != null) { @@ -158,11 +135,31 @@ public void verifyDelete() { verify(requestPatternBuilder); } + public static JsonWiremockHelper builder(ObjectMapper mapper) { + return new JsonWiremockHelper(mapper); + } + + private MappingBuilder updateMappingBuilder(MappingBuilder mappingBuilder) { + queryParamMap.forEach((name, value) -> mappingBuilder.withQueryParam(name, equalTo(value))); + + if (requestBody != null) { + mappingBuilder.withRequestBody(equalToJson(requestBody)); + } + + if (responseBody != null) { + mappingBuilder.willReturn(aResponse() + .withHeader(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE) + .withBody(responseBody) + ); + } + return mappingBuilder; + } + private static String convertToRegexString(final String value, String... fieldToIgnore) { return ignoreFields( value - .replaceAll("\\{", "\\\\{") - .replaceAll("\\}", "\\\\}"), + .replace("\\{", "\\\\{") + .replace("\\}", "\\\\}"), fieldToIgnore ); } diff --git a/mocks/maskinporten-mock/build.gradle b/mocks/maskinporten-mock/build.gradle index bc526055b0b..a7634cab143 100644 --- a/mocks/maskinporten-mock/build.gradle +++ b/mocks/maskinporten-mock/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" } @@ -11,7 +11,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -33,7 +33,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' compileOnly 'jakarta.servlet:jakarta.servlet-api:6.0.0' @@ -41,4 +41,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties b/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties +++ b/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mocks/tokendings-mock/build.gradle b/mocks/tokendings-mock/build.gradle index 564cbad2e92..910259d56b6 100644 --- a/mocks/tokendings-mock/build.gradle +++ b/mocks/tokendings-mock/build.gradle @@ -1,6 +1,6 @@ plugins { id 'java' - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" } @@ -11,7 +11,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -34,11 +34,11 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-webflux' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' - implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.0.2' + implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' compileOnly 'jakarta.servlet:jakarta.servlet-api:6.0.0' implementation 'org.projectlombok:lombok' annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties b/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties +++ b/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/aareg-proxy/build.gradle b/proxies/aareg-proxy/build.gradle index 8ebf58906a0..f8a454ead16 100644 --- a/proxies/aareg-proxy/build.gradle +++ b/proxies/aareg-proxy/build.gradle @@ -3,7 +3,7 @@ plugins { id 'io.spring.dependency-management' version "1.1.0" id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -71,5 +71,5 @@ dependencies { } java { - sourceCompatibility = JavaVersion.VERSION_17 + sourceCompatibility = JavaVersion.VERSION_20 } \ No newline at end of file diff --git a/proxies/aareg-synt-services-proxy/build.gradle b/proxies/aareg-synt-services-proxy/build.gradle index 2598eac6740..a7cc27c2bdf 100644 --- a/proxies/aareg-synt-services-proxy/build.gradle +++ b/proxies/aareg-synt-services-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -63,4 +63,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/arbeidsplassencv-proxy/build.gradle b/proxies/arbeidsplassencv-proxy/build.gradle index 86360e06668..bb9b26a5010 100644 --- a/proxies/arbeidsplassencv-proxy/build.gradle +++ b/proxies/arbeidsplassencv-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -70,4 +70,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/arena-forvalteren-proxy/build.gradle b/proxies/arena-forvalteren-proxy/build.gradle index eee2ba3f396..abcbe732c31 100644 --- a/proxies/arena-forvalteren-proxy/build.gradle +++ b/proxies/arena-forvalteren-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "io.freefair.lombok" version "6.6.2" id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -40,7 +40,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/batch-adeo-proxy/build.gradle b/proxies/batch-adeo-proxy/build.gradle index 6e20ca7d5d2..226f855ed43 100644 --- a/proxies/batch-adeo-proxy/build.gradle +++ b/proxies/batch-adeo-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -64,4 +64,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/brregstub-proxy/build.gradle b/proxies/brregstub-proxy/build.gradle index e82e9dbe465..88a0d307de9 100644 --- a/proxies/brregstub-proxy/build.gradle +++ b/proxies/brregstub-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/dokarkiv-proxy/build.gradle b/proxies/dokarkiv-proxy/build.gradle index dcf9a438b1b..9466a270116 100644 --- a/proxies/dokarkiv-proxy/build.gradle +++ b/proxies/dokarkiv-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version '1.0.11.RELEASE' id "jacoco" } @@ -33,7 +33,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -63,4 +63,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/dokarkiv-proxy/src/main/java/no/nav/testnav/proxies/dokarkivproxy/config/LocalVaultConfig.java b/proxies/dokarkiv-proxy/src/main/java/no/nav/testnav/proxies/dokarkivproxy/config/LocalVaultConfig.java index 8fe8145df55..3923071c26f 100644 --- a/proxies/dokarkiv-proxy/src/main/java/no/nav/testnav/proxies/dokarkivproxy/config/LocalVaultConfig.java +++ b/proxies/dokarkiv-proxy/src/main/java/no/nav/testnav/proxies/dokarkivproxy/config/LocalVaultConfig.java @@ -8,13 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; -import static java.util.Objects.isNull; +import static io.micrometer.common.util.StringUtils.isBlank; @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,14 +24,13 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { - if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (isNull(token)) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/ereg-proxy/build.gradle b/proxies/ereg-proxy/build.gradle index 857b7effedf..34cbebad30e 100644 --- a/proxies/ereg-proxy/build.gradle +++ b/proxies/ereg-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/histark-proxy/build.gradle b/proxies/histark-proxy/build.gradle index cd230be8df9..218f5248989 100644 --- a/proxies/histark-proxy/build.gradle +++ b/proxies/histark-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/hodejegeren-proxy/build.gradle b/proxies/hodejegeren-proxy/build.gradle index 07430a15e59..96da8190a10 100644 --- a/proxies/hodejegeren-proxy/build.gradle +++ b/proxies/hodejegeren-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/inntektstub-proxy/build.gradle b/proxies/inntektstub-proxy/build.gradle index d692c3c55cc..de99c297d4e 100644 --- a/proxies/inntektstub-proxy/build.gradle +++ b/proxies/inntektstub-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/inst-proxy/build.gradle b/proxies/inst-proxy/build.gradle index a37e0ef9272..c3071c62750 100644 --- a/proxies/inst-proxy/build.gradle +++ b/proxies/inst-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 \ No newline at end of file +java.sourceCompatibility = JavaVersion.VERSION_20 \ No newline at end of file diff --git a/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/kodeverk-proxy/build.gradle b/proxies/kodeverk-proxy/build.gradle index d8ea50caa4d..7e9aaa3f145 100644 --- a/proxies/kodeverk-proxy/build.gradle +++ b/proxies/kodeverk-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/kontoregister-person-proxy/build.gradle b/proxies/kontoregister-person-proxy/build.gradle index 7f34e262f5a..7cad01ef02a 100644 --- a/proxies/kontoregister-person-proxy/build.gradle +++ b/proxies/kontoregister-person-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/kontoregister-person-proxy/src/main/java/no/nav/testnav/proxies/kontoregisterperson/config/LocalVaultConfig.java b/proxies/kontoregister-person-proxy/src/main/java/no/nav/testnav/proxies/kontoregisterperson/config/LocalVaultConfig.java index 1b173de494a..502379dd5df 100644 --- a/proxies/kontoregister-person-proxy/src/main/java/no/nav/testnav/proxies/kontoregisterperson/config/LocalVaultConfig.java +++ b/proxies/kontoregister-person-proxy/src/main/java/no/nav/testnav/proxies/kontoregisterperson/config/LocalVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } diff --git a/proxies/krrstub-proxy/build.gradle b/proxies/krrstub-proxy/build.gradle index 0a850c5229d..9e478793a28 100644 --- a/proxies/krrstub-proxy/build.gradle +++ b/proxies/krrstub-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/krrstub-proxy/src/main/java/no/nav/testnav/proxies/krrstubproxy/config/LocalVaultConfig.java b/proxies/krrstub-proxy/src/main/java/no/nav/testnav/proxies/krrstubproxy/config/LocalVaultConfig.java index f4b92e518b8..b9774bba8c1 100644 --- a/proxies/krrstub-proxy/src/main/java/no/nav/testnav/proxies/krrstubproxy/config/LocalVaultConfig.java +++ b/proxies/krrstub-proxy/src/main/java/no/nav/testnav/proxies/krrstubproxy/config/LocalVaultConfig.java @@ -8,12 +8,16 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) @VaultPropertySource(value = "kv/preprod/fss/testnav-krrstub-proxy/dev", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -22,12 +26,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/medl-proxy/build.gradle b/proxies/medl-proxy/build.gradle index 5c19ff4c29f..753713ca51d 100644 --- a/proxies/medl-proxy/build.gradle +++ b/proxies/medl-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/medl-proxy/src/main/java/no/nav/testnav/proxies/medlproxy/config/LocalVaultConfig.java b/proxies/medl-proxy/src/main/java/no/nav/testnav/proxies/medlproxy/config/LocalVaultConfig.java index 5bcb511316a..f77b1269030 100644 --- a/proxies/medl-proxy/src/main/java/no/nav/testnav/proxies/medlproxy/config/LocalVaultConfig.java +++ b/proxies/medl-proxy/src/main/java/no/nav/testnav/proxies/medlproxy/config/LocalVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/norg2-proxy/build.gradle b/proxies/norg2-proxy/build.gradle index 61afff9cd00..9220b7daa39 100644 --- a/proxies/norg2-proxy/build.gradle +++ b/proxies/norg2-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -32,7 +32,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -60,4 +60,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/norg2-proxy/src/main/java/no/nav/testnav/proxies/norg2proxy/StatusController.java b/proxies/norg2-proxy/src/main/java/no/nav/testnav/proxies/norg2proxy/StatusController.java index 5fec58bc3c9..1b44b8f3269 100644 --- a/proxies/norg2-proxy/src/main/java/no/nav/testnav/proxies/norg2proxy/StatusController.java +++ b/proxies/norg2-proxy/src/main/java/no/nav/testnav/proxies/norg2proxy/StatusController.java @@ -23,7 +23,7 @@ public Map getStatus() { statusWebClient); return Map.of( - "norg2", pensjonStatus + TEAM, pensjonStatus ); } diff --git a/proxies/pdl-proxy/build.gradle b/proxies/pdl-proxy/build.gradle index 4d0d5716e9f..4e3e3a3ab28 100644 --- a/proxies/pdl-proxy/build.gradle +++ b/proxies/pdl-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/pdl-proxy/src/main/java/no/nav/testnav/proxies/pdlproxy/config/DevVaultConfig.java b/proxies/pdl-proxy/src/main/java/no/nav/testnav/proxies/pdlproxy/config/DevVaultConfig.java index ddd655cc455..97fc9feca3d 100644 --- a/proxies/pdl-proxy/src/main/java/no/nav/testnav/proxies/pdlproxy/config/DevVaultConfig.java +++ b/proxies/pdl-proxy/src/main/java/no/nav/testnav/proxies/pdlproxy/config/DevVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Profile("dev") @Configuration @VaultPropertySource(value = "kv/preprod/fss/testnav-pdl-proxy/dev", ignoreSecretNotFound = false) public class DevVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/pensjon-testdata-facade-proxy/build.gradle b/proxies/pensjon-testdata-facade-proxy/build.gradle index abaf096b24e..05adea364e5 100644 --- a/proxies/pensjon-testdata-facade-proxy/build.gradle +++ b/proxies/pensjon-testdata-facade-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "io.freefair.lombok" version "6.6.2" id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/pensjon-testdata-facade-proxy/src/main/java/no/nav/testnav/proxies/pensjontestdatafacadeproxy/config/LocalVaultConfig.java b/proxies/pensjon-testdata-facade-proxy/src/main/java/no/nav/testnav/proxies/pensjontestdatafacadeproxy/config/LocalVaultConfig.java index 578e25e30a1..8383d29d3f7 100644 --- a/proxies/pensjon-testdata-facade-proxy/src/main/java/no/nav/testnav/proxies/pensjontestdatafacadeproxy/config/LocalVaultConfig.java +++ b/proxies/pensjon-testdata-facade-proxy/src/main/java/no/nav/testnav/proxies/pensjontestdatafacadeproxy/config/LocalVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class LocalVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } diff --git a/proxies/saf-proxy/build.gradle b/proxies/saf-proxy/build.gradle index e683afdb2ce..71b0d87a876 100644 --- a/proxies/saf-proxy/build.gradle +++ b/proxies/saf-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/sigrunstub-proxy/build.gradle b/proxies/sigrunstub-proxy/build.gradle index bdc539611aa..3b2b2928cd2 100644 --- a/proxies/sigrunstub-proxy/build.gradle +++ b/proxies/sigrunstub-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -65,4 +65,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/skjermingsregister-proxy/build.gradle b/proxies/skjermingsregister-proxy/build.gradle index 788fc3cd5d2..42acbc2258f 100644 --- a/proxies/skjermingsregister-proxy/build.gradle +++ b/proxies/skjermingsregister-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/skjermingsregister-proxy/src/main/java/no/nav/testnav/proxies/skjermingsregisterproxy/DevVaultConfig.java b/proxies/skjermingsregister-proxy/src/main/java/no/nav/testnav/proxies/skjermingsregisterproxy/DevVaultConfig.java index 146ecdb0ebb..e863c82d83d 100644 --- a/proxies/skjermingsregister-proxy/src/main/java/no/nav/testnav/proxies/skjermingsregisterproxy/DevVaultConfig.java +++ b/proxies/skjermingsregister-proxy/src/main/java/no/nav/testnav/proxies/skjermingsregisterproxy/DevVaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Profile("dev") @Configuration @VaultPropertySource(value = "kv/preprod/fss/testnav-skjermingsregister-proxy/dev", ignoreSecretNotFound = false) public class DevVaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkreved property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/statisk-data-forvalter-proxy/build.gradle b/proxies/statisk-data-forvalter-proxy/build.gradle index efdb343cb30..7c895ccabc3 100644 --- a/proxies/statisk-data-forvalter-proxy/build.gradle +++ b/proxies/statisk-data-forvalter-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/synthdata-meldekort-proxy/build.gradle b/proxies/synthdata-meldekort-proxy/build.gradle index e88298bf237..72b932ea708 100644 --- a/proxies/synthdata-meldekort-proxy/build.gradle +++ b/proxies/synthdata-meldekort-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -38,7 +38,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -73,4 +73,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 \ No newline at end of file +java.sourceCompatibility = JavaVersion.VERSION_20 \ No newline at end of file diff --git a/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/synthdata-meldekort-proxy/src/main/java/no/nav/testnav/proxies/synthdatameldekortproxy/config/VaultConfig.java b/proxies/synthdata-meldekort-proxy/src/main/java/no/nav/testnav/proxies/synthdatameldekortproxy/config/VaultConfig.java index 52b719feede..25bff4f7e57 100644 --- a/proxies/synthdata-meldekort-proxy/src/main/java/no/nav/testnav/proxies/synthdatameldekortproxy/config/VaultConfig.java +++ b/proxies/synthdata-meldekort-proxy/src/main/java/no/nav/testnav/proxies/synthdatameldekortproxy/config/VaultConfig.java @@ -8,11 +8,15 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Configuration @Profile("dev") @VaultPropertySource(value = "azuread/prod/creds/team-dolly-lokal-app", ignoreSecretNotFound = false) public class VaultConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -21,12 +25,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { - throw new IllegalArgumentException("Påkrevd property 'spring.cloud.vault.token' er ikke satt."); + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { + throw new IllegalArgumentException("påkrevd property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/tps-forvalteren-proxy/build.gradle b/proxies/tps-forvalteren-proxy/build.gradle index 8cfda235d5d..1cbfedab56c 100644 --- a/proxies/tps-forvalteren-proxy/build.gradle +++ b/proxies/tps-forvalteren-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -48,7 +48,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { diff --git a/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/tps-forvalteren-proxy/src/main/java/no/nav/testnav/proxies/tpsforvalterenproxy/config/VaultDevConfig.java b/proxies/tps-forvalteren-proxy/src/main/java/no/nav/testnav/proxies/tpsforvalterenproxy/config/VaultDevConfig.java index d968f371c43..e389bdd62ea 100644 --- a/proxies/tps-forvalteren-proxy/src/main/java/no/nav/testnav/proxies/tpsforvalterenproxy/config/VaultDevConfig.java +++ b/proxies/tps-forvalteren-proxy/src/main/java/no/nav/testnav/proxies/tpsforvalterenproxy/config/VaultDevConfig.java @@ -10,14 +10,18 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; +import static io.micrometer.common.util.StringUtils.isBlank; + @Slf4j @Configuration -@Profile({"dev"}) +@Profile({ "dev" }) @RequiredArgsConstructor @VaultPropertySource(value = "serviceuser/dev/srvtps-forvalteren", propertyNamePrefix = "credentials.", ignoreSecretNotFound = false) @VaultPropertySource(value = "kv/preprod/fss/tps-forvalteren-proxy/local", ignoreSecretNotFound = false) public class VaultDevConfig extends AbstractVaultConfiguration { + private static final String VAULT_TOKEN = "spring.cloud.vault.token"; + @Override public VaultEndpoint vaultEndpoint() { return VaultEndpoint.create("vault.adeo.no", 443); @@ -26,12 +30,12 @@ public VaultEndpoint vaultEndpoint() { @Override public ClientAuthentication clientAuthentication() { if (System.getenv().containsKey("VAULT_TOKEN")) { - System.setProperty("spring.cloud.vault.token", System.getenv("VAULT_TOKEN")); + System.setProperty(VAULT_TOKEN, System.getenv("VAULT_TOKEN")); } - var token = System.getProperty("spring.cloud.vault.token"); - if (token == null) { + var token = System.getProperty(VAULT_TOKEN); + if (isBlank(token)) { throw new IllegalArgumentException("Påkrevet property 'spring.cloud.vault.token' er ikke satt."); } - return new TokenAuthentication(System.getProperty("spring.cloud.vault.token")); + return new TokenAuthentication(System.getProperty(VAULT_TOKEN)); } } \ No newline at end of file diff --git a/proxies/udistub-proxy/build.gradle b/proxies/udistub-proxy/build.gradle index b9232ecd085..1fe803d46f5 100644 --- a/proxies/udistub-proxy/build.gradle +++ b/proxies/udistub-proxy/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.4" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.0" id "jacoco" } @@ -39,7 +39,7 @@ bootJar { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.1' + mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 diff --git a/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/xsd/arbeidsforhold-xsd/build.gradle b/xsd/arbeidsforhold-xsd/build.gradle index 2f8d5cec19d..e3e5a7e84bb 100644 --- a/xsd/arbeidsforhold-xsd/build.gradle +++ b/xsd/arbeidsforhold-xsd/build.gradle @@ -15,10 +15,10 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_17 +java.sourceCompatibility = JavaVersion.VERSION_20 dependencies { - implementation 'jakarta.activation:jakarta.activation-api:2.1.1' + implementation 'jakarta.activation:jakarta.activation-api:2.1.2' implementation 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' xjc 'jakarta.xml.bind:jakarta.xml.bind-api:4.0.0' diff --git a/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties b/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties index e1bef7e873c..e381c1fb3a7 100644 --- a/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties +++ b/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.2-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From b982e801bf919bcc4453b324d966b40d5b8ba975 Mon Sep 17 00:00:00 2001 From: stigus Date: Wed, 4 Oct 2023 16:08:17 +0200 Subject: [PATCH 03/18] Stor refaktorering til ny versjon av Gradle, Spring og Java 21 --- apps/adresse-service/build.gradle | 2 +- apps/amelding-service/build.gradle | 2 +- apps/app-tilgang-analyse-service/build.gradle | 2 +- apps/arbeidsforhold-export-api/build.gradle | 2 +- apps/arbeidsforhold-service/build.gradle | 2 +- apps/batch-bestilling-service/build.gradle | 2 +- apps/brreg-stub/build.gradle | 2 +- apps/bruker-service/build.gradle | 2 +- apps/dolly-backend/build.gradle | 2 +- apps/dolly-frontend/build.gradle | 2 +- apps/dollystatus/build.gradle | 2 +- apps/endringsmelding-frontend/build.gradle | 2 +- apps/endringsmelding-service/build.gradle | 2 +- apps/ereg-batch-status-service/build.gradle | 2 +- apps/faste-data-frontend/build.gradle | 2 +- apps/generer-arbeidsforhold-populasjon-service/build.gradle | 2 +- apps/generer-navn-service/build.gradle | 2 +- apps/generer-organisasjon-populasjon-service/build.gradle | 2 +- apps/generer-synt-amelding-service/build.gradle | 2 +- apps/geografiske-kodeverk-service/build.gradle | 2 +- apps/helsepersonell-service/build.gradle | 2 +- apps/hodejegeren/build.gradle | 2 +- apps/import-person-service/build.gradle | 2 +- apps/inntektsmelding-generator-service/build.gradle | 2 +- apps/inntektsmelding-service/build.gradle | 2 +- apps/jenkins-batch-status-service/build.gradle | 2 +- apps/joark-dokument-service/build.gradle | 2 +- apps/miljoer-service/build.gradle | 2 +- apps/mn-synt-arbeidsforhold-service/build.gradle | 2 +- apps/oppsummeringsdokument-service/build.gradle | 2 +- apps/organisasjon-bestilling-service/build.gradle | 2 +- apps/organisasjon-faste-data-service/build.gradle | 2 +- apps/organisasjon-forvalter/build.gradle | 2 +- apps/organisasjon-mottak-service/build.gradle | 2 +- apps/organisasjon-service/build.gradle | 2 +- apps/organisasjon-tilgang-frontend/build.gradle | 2 +- apps/organisasjon-tilgang-service/build.gradle | 2 +- apps/orgnummer-service/build.gradle | 2 +- apps/oversikt-frontend/build.gradle | 2 +- apps/pdl-forvalter/build.gradle | 2 +- apps/person-export-api/build.gradle | 2 +- apps/person-faste-data-service/build.gradle | 2 +- apps/person-organisasjon-tilgang-service/build.gradle | 2 +- apps/person-search-service/build.gradle | 2 +- apps/person-service/build.gradle | 2 +- apps/profil-api/build.gradle | 2 +- apps/sykemelding-api/build.gradle | 2 +- apps/synt-sykemelding-api/build.gradle | 2 +- apps/synt-vedtakshistorikk-service/build.gradle | 2 +- apps/testnav-ident-pool/build.gradle | 2 +- apps/testnorge-bisys/build.gradle | 2 +- apps/testnorge-statisk-data-forvalter/build.gradle | 2 +- apps/testnorge-tp/build.gradle | 2 +- apps/tilbakemelding-api/build.gradle | 2 +- apps/tps-messaging-service/build.gradle | 2 +- apps/udi-stub/build.gradle | 2 +- apps/varslinger-service/build.gradle | 2 +- examples/reactive-rest-example/build.gradle | 2 +- libs/avro-schema/build.gradle | 2 +- libs/commands/build.gradle | 2 +- libs/csv-converter/build.gradle | 2 +- libs/data-transfer-objects/build.gradle | 2 +- libs/database/build.gradle | 2 +- libs/domain/build.gradle | 2 +- libs/integration-test/build.gradle | 2 +- libs/kafka-config/build.gradle | 2 +- libs/kafka-producers/build.gradle | 2 +- libs/reactive-core/build.gradle | 2 +- libs/reactive-frontend/build.gradle | 2 +- libs/reactive-proxy/build.gradle | 2 +- libs/reactive-security/build.gradle | 2 +- libs/reactive-session-security/build.gradle | 2 +- libs/security-core/build.gradle | 2 +- libs/security-token-service/build.gradle | 2 +- libs/servlet-core/build.gradle | 2 +- libs/servlet-insecure-security/build.gradle | 2 +- libs/servlet-security/build.gradle | 2 +- libs/slack/build.gradle | 2 +- libs/testing/build.gradle | 2 +- mocks/maskinporten-mock/build.gradle | 2 +- mocks/tokendings-mock/build.gradle | 2 +- proxies/aareg-proxy/build.gradle | 2 +- proxies/aareg-synt-services-proxy/build.gradle | 2 +- proxies/arbeidsplassencv-proxy/build.gradle | 2 +- proxies/arena-forvalteren-proxy/build.gradle | 2 +- proxies/batch-adeo-proxy/build.gradle | 2 +- proxies/brregstub-proxy/build.gradle | 2 +- proxies/dokarkiv-proxy/build.gradle | 2 +- proxies/ereg-proxy/build.gradle | 2 +- proxies/histark-proxy/build.gradle | 2 +- proxies/hodejegeren-proxy/build.gradle | 2 +- proxies/inntektstub-proxy/build.gradle | 2 +- proxies/inst-proxy/build.gradle | 2 +- proxies/kodeverk-proxy/build.gradle | 2 +- proxies/kontoregister-person-proxy/build.gradle | 2 +- proxies/krrstub-proxy/build.gradle | 2 +- proxies/medl-proxy/build.gradle | 2 +- proxies/norg2-proxy/build.gradle | 2 +- proxies/pdl-proxy/build.gradle | 2 +- proxies/pensjon-testdata-facade-proxy/build.gradle | 2 +- proxies/saf-proxy/build.gradle | 2 +- proxies/sigrunstub-proxy/build.gradle | 2 +- proxies/skjermingsregister-proxy/build.gradle | 2 +- proxies/statisk-data-forvalter-proxy/build.gradle | 2 +- proxies/synthdata-meldekort-proxy/build.gradle | 2 +- proxies/tps-forvalteren-proxy/build.gradle | 2 +- proxies/udistub-proxy/build.gradle | 2 +- xsd/arbeidsforhold-xsd/build.gradle | 2 +- 108 files changed, 108 insertions(+), 108 deletions(-) diff --git a/apps/adresse-service/build.gradle b/apps/adresse-service/build.gradle index 458aa20b901..e6eb7a087a8 100644 --- a/apps/adresse-service/build.gradle +++ b/apps/adresse-service/build.gradle @@ -77,4 +77,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/amelding-service/build.gradle b/apps/amelding-service/build.gradle index b3f52afe1ef..a3ae65d1994 100644 --- a/apps/amelding-service/build.gradle +++ b/apps/amelding-service/build.gradle @@ -82,4 +82,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/app-tilgang-analyse-service/build.gradle b/apps/app-tilgang-analyse-service/build.gradle index ee5df3f4b1f..a800ba781a7 100644 --- a/apps/app-tilgang-analyse-service/build.gradle +++ b/apps/app-tilgang-analyse-service/build.gradle @@ -79,4 +79,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/arbeidsforhold-export-api/build.gradle b/apps/arbeidsforhold-export-api/build.gradle index 3f656bec417..9cd4bd2ae93 100644 --- a/apps/arbeidsforhold-export-api/build.gradle +++ b/apps/arbeidsforhold-export-api/build.gradle @@ -85,4 +85,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/arbeidsforhold-service/build.gradle b/apps/arbeidsforhold-service/build.gradle index a73f707fa7e..26efb522e81 100644 --- a/apps/arbeidsforhold-service/build.gradle +++ b/apps/arbeidsforhold-service/build.gradle @@ -94,4 +94,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/batch-bestilling-service/build.gradle b/apps/batch-bestilling-service/build.gradle index 279824d160a..ac5d823252d 100644 --- a/apps/batch-bestilling-service/build.gradle +++ b/apps/batch-bestilling-service/build.gradle @@ -80,4 +80,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index eb48df53816..21c1588004a 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -121,4 +121,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/bruker-service/build.gradle b/apps/bruker-service/build.gradle index b16bfa274ef..758b31bc4b2 100644 --- a/apps/bruker-service/build.gradle +++ b/apps/bruker-service/build.gradle @@ -100,4 +100,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 9863f70a3cf..283460d43b7 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -45,7 +45,7 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 repositories { mavenCentral() diff --git a/apps/dolly-frontend/build.gradle b/apps/dolly-frontend/build.gradle index a7ece84a8b4..aa13ad0b5c7 100644 --- a/apps/dolly-frontend/build.gradle +++ b/apps/dolly-frontend/build.gradle @@ -56,7 +56,7 @@ configurations { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/apps/dollystatus/build.gradle b/apps/dollystatus/build.gradle index 74447886787..834d7a3e61d 100644 --- a/apps/dollystatus/build.gradle +++ b/apps/dollystatus/build.gradle @@ -46,4 +46,4 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/endringsmelding-frontend/build.gradle b/apps/endringsmelding-frontend/build.gradle index 33162310b22..cdcbed06abc 100644 --- a/apps/endringsmelding-frontend/build.gradle +++ b/apps/endringsmelding-frontend/build.gradle @@ -88,4 +88,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/endringsmelding-service/build.gradle b/apps/endringsmelding-service/build.gradle index a4e4f110887..3e5c904fd34 100644 --- a/apps/endringsmelding-service/build.gradle +++ b/apps/endringsmelding-service/build.gradle @@ -68,4 +68,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index a3572480a1c..72146c8b95c 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -79,4 +79,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/faste-data-frontend/build.gradle b/apps/faste-data-frontend/build.gradle index 0d8011b5754..ed1f63635ea 100644 --- a/apps/faste-data-frontend/build.gradle +++ b/apps/faste-data-frontend/build.gradle @@ -88,4 +88,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/generer-arbeidsforhold-populasjon-service/build.gradle b/apps/generer-arbeidsforhold-populasjon-service/build.gradle index de6adde886d..390f5041b06 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/build.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/build.gradle @@ -77,4 +77,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/generer-navn-service/build.gradle b/apps/generer-navn-service/build.gradle index fa35019c86d..992a6c85d08 100644 --- a/apps/generer-navn-service/build.gradle +++ b/apps/generer-navn-service/build.gradle @@ -78,4 +78,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/generer-organisasjon-populasjon-service/build.gradle b/apps/generer-organisasjon-populasjon-service/build.gradle index d1511f2cde0..b81cfa75191 100644 --- a/apps/generer-organisasjon-populasjon-service/build.gradle +++ b/apps/generer-organisasjon-populasjon-service/build.gradle @@ -97,4 +97,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/generer-synt-amelding-service/build.gradle b/apps/generer-synt-amelding-service/build.gradle index 8c5e9a1d17f..b4b57238632 100644 --- a/apps/generer-synt-amelding-service/build.gradle +++ b/apps/generer-synt-amelding-service/build.gradle @@ -72,4 +72,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/geografiske-kodeverk-service/build.gradle b/apps/geografiske-kodeverk-service/build.gradle index c6509e5678f..06a561d8f83 100644 --- a/apps/geografiske-kodeverk-service/build.gradle +++ b/apps/geografiske-kodeverk-service/build.gradle @@ -80,4 +80,4 @@ dependencies { } description = 'geografiske-kodeverk-service' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/helsepersonell-service/build.gradle b/apps/helsepersonell-service/build.gradle index 5d3eb644946..888e8dc533f 100644 --- a/apps/helsepersonell-service/build.gradle +++ b/apps/helsepersonell-service/build.gradle @@ -76,4 +76,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 \ No newline at end of file +java.sourceCompatibility = JavaVersion.VERSION_21 \ No newline at end of file diff --git a/apps/hodejegeren/build.gradle b/apps/hodejegeren/build.gradle index be741df8d6e..bc6e0c5e47d 100644 --- a/apps/hodejegeren/build.gradle +++ b/apps/hodejegeren/build.gradle @@ -90,4 +90,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/import-person-service/build.gradle b/apps/import-person-service/build.gradle index 25c027564cc..bc40a4c85d0 100644 --- a/apps/import-person-service/build.gradle +++ b/apps/import-person-service/build.gradle @@ -82,4 +82,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/inntektsmelding-generator-service/build.gradle b/apps/inntektsmelding-generator-service/build.gradle index 76a46c5c1e5..0c64b5f7be1 100644 --- a/apps/inntektsmelding-generator-service/build.gradle +++ b/apps/inntektsmelding-generator-service/build.gradle @@ -84,4 +84,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/inntektsmelding-service/build.gradle b/apps/inntektsmelding-service/build.gradle index 9020a068588..cb3208f0eff 100644 --- a/apps/inntektsmelding-service/build.gradle +++ b/apps/inntektsmelding-service/build.gradle @@ -94,4 +94,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/jenkins-batch-status-service/build.gradle b/apps/jenkins-batch-status-service/build.gradle index 536a82029ba..d72b5dd85fd 100644 --- a/apps/jenkins-batch-status-service/build.gradle +++ b/apps/jenkins-batch-status-service/build.gradle @@ -80,4 +80,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/joark-dokument-service/build.gradle b/apps/joark-dokument-service/build.gradle index 05ba6cbb91e..ccf58101844 100644 --- a/apps/joark-dokument-service/build.gradle +++ b/apps/joark-dokument-service/build.gradle @@ -77,4 +77,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/miljoer-service/build.gradle b/apps/miljoer-service/build.gradle index 10d93728224..5e5f79f74d8 100644 --- a/apps/miljoer-service/build.gradle +++ b/apps/miljoer-service/build.gradle @@ -78,4 +78,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/mn-synt-arbeidsforhold-service/build.gradle b/apps/mn-synt-arbeidsforhold-service/build.gradle index fcaceb88abb..c11b0a58eec 100644 --- a/apps/mn-synt-arbeidsforhold-service/build.gradle +++ b/apps/mn-synt-arbeidsforhold-service/build.gradle @@ -88,4 +88,4 @@ dependencies { } description = 'mn-synt-arbeidsforhold-service' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index 2e7c87cb159..2b5eb4accb7 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -106,4 +106,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/organisasjon-bestilling-service/build.gradle b/apps/organisasjon-bestilling-service/build.gradle index 21d88568c55..fcf7aa12dfc 100644 --- a/apps/organisasjon-bestilling-service/build.gradle +++ b/apps/organisasjon-bestilling-service/build.gradle @@ -87,4 +87,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/organisasjon-faste-data-service/build.gradle b/apps/organisasjon-faste-data-service/build.gradle index 4ede8dfc775..35f92d4b93f 100644 --- a/apps/organisasjon-faste-data-service/build.gradle +++ b/apps/organisasjon-faste-data-service/build.gradle @@ -95,4 +95,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/organisasjon-forvalter/build.gradle b/apps/organisasjon-forvalter/build.gradle index bd40036f0e9..e87b237a30a 100644 --- a/apps/organisasjon-forvalter/build.gradle +++ b/apps/organisasjon-forvalter/build.gradle @@ -56,7 +56,7 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/apps/organisasjon-mottak-service/build.gradle b/apps/organisasjon-mottak-service/build.gradle index b53f44dfcbb..9900d1d2aba 100644 --- a/apps/organisasjon-mottak-service/build.gradle +++ b/apps/organisasjon-mottak-service/build.gradle @@ -89,4 +89,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/organisasjon-service/build.gradle b/apps/organisasjon-service/build.gradle index 484a191a149..84aa849a403 100644 --- a/apps/organisasjon-service/build.gradle +++ b/apps/organisasjon-service/build.gradle @@ -80,4 +80,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/organisasjon-tilgang-frontend/build.gradle b/apps/organisasjon-tilgang-frontend/build.gradle index bda7cdf61e4..100fbd1f705 100644 --- a/apps/organisasjon-tilgang-frontend/build.gradle +++ b/apps/organisasjon-tilgang-frontend/build.gradle @@ -84,4 +84,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/organisasjon-tilgang-service/build.gradle b/apps/organisasjon-tilgang-service/build.gradle index 9d7d59a4982..336dca11cbc 100644 --- a/apps/organisasjon-tilgang-service/build.gradle +++ b/apps/organisasjon-tilgang-service/build.gradle @@ -32,7 +32,7 @@ sonarqube { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 bootJar { archiveFileName = "app.jar" diff --git a/apps/orgnummer-service/build.gradle b/apps/orgnummer-service/build.gradle index e71e7b9f5f1..f75a431cbb3 100644 --- a/apps/orgnummer-service/build.gradle +++ b/apps/orgnummer-service/build.gradle @@ -88,4 +88,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/oversikt-frontend/build.gradle b/apps/oversikt-frontend/build.gradle index b9729dc0fa0..f9fc51092f7 100644 --- a/apps/oversikt-frontend/build.gradle +++ b/apps/oversikt-frontend/build.gradle @@ -81,4 +81,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/pdl-forvalter/build.gradle b/apps/pdl-forvalter/build.gradle index 19b23fc5b30..7e798b6f20e 100644 --- a/apps/pdl-forvalter/build.gradle +++ b/apps/pdl-forvalter/build.gradle @@ -55,7 +55,7 @@ repositories { } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/apps/person-export-api/build.gradle b/apps/person-export-api/build.gradle index 1661a0b426e..5c337fa192c 100644 --- a/apps/person-export-api/build.gradle +++ b/apps/person-export-api/build.gradle @@ -81,4 +81,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/person-faste-data-service/build.gradle b/apps/person-faste-data-service/build.gradle index 9face2e18b8..05d796fd770 100644 --- a/apps/person-faste-data-service/build.gradle +++ b/apps/person-faste-data-service/build.gradle @@ -82,4 +82,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/person-organisasjon-tilgang-service/build.gradle b/apps/person-organisasjon-tilgang-service/build.gradle index 9795f2f0ae6..968d311b9ff 100644 --- a/apps/person-organisasjon-tilgang-service/build.gradle +++ b/apps/person-organisasjon-tilgang-service/build.gradle @@ -43,7 +43,7 @@ sonarqube { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 bootJar { archiveFileName = "app.jar" diff --git a/apps/person-search-service/build.gradle b/apps/person-search-service/build.gradle index 9426de3daa2..fccdda01212 100644 --- a/apps/person-search-service/build.gradle +++ b/apps/person-search-service/build.gradle @@ -44,7 +44,7 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 repositories { mavenCentral() diff --git a/apps/person-service/build.gradle b/apps/person-service/build.gradle index 204b801cf6b..9a65414826d 100644 --- a/apps/person-service/build.gradle +++ b/apps/person-service/build.gradle @@ -42,7 +42,7 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 repositories { mavenCentral() diff --git a/apps/profil-api/build.gradle b/apps/profil-api/build.gradle index e57ca5b33c4..4c7f976f85b 100644 --- a/apps/profil-api/build.gradle +++ b/apps/profil-api/build.gradle @@ -81,4 +81,4 @@ dependencies { } description = 'profil-api' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/sykemelding-api/build.gradle b/apps/sykemelding-api/build.gradle index bb1eb91bf5d..a4315e02c59 100644 --- a/apps/sykemelding-api/build.gradle +++ b/apps/sykemelding-api/build.gradle @@ -98,4 +98,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index 728d77112dc..f1dfbdb3e6f 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -81,4 +81,4 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/synt-vedtakshistorikk-service/build.gradle b/apps/synt-vedtakshistorikk-service/build.gradle index b96bd72e151..4c91ca5f0a3 100644 --- a/apps/synt-vedtakshistorikk-service/build.gradle +++ b/apps/synt-vedtakshistorikk-service/build.gradle @@ -47,7 +47,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'no.nav.testnav.libs:servlet-core' diff --git a/apps/testnav-ident-pool/build.gradle b/apps/testnav-ident-pool/build.gradle index 8681ada48e9..1fc293efcda 100644 --- a/apps/testnav-ident-pool/build.gradle +++ b/apps/testnav-ident-pool/build.gradle @@ -65,7 +65,7 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/apps/testnorge-bisys/build.gradle b/apps/testnorge-bisys/build.gradle index 5ba9aed0b4d..3802d7855d5 100644 --- a/apps/testnorge-bisys/build.gradle +++ b/apps/testnorge-bisys/build.gradle @@ -96,4 +96,4 @@ dependencies { } description = 'testnorge-bisys' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/testnorge-statisk-data-forvalter/build.gradle b/apps/testnorge-statisk-data-forvalter/build.gradle index 7dcd6fa65fe..fe319e18029 100644 --- a/apps/testnorge-statisk-data-forvalter/build.gradle +++ b/apps/testnorge-statisk-data-forvalter/build.gradle @@ -107,4 +107,4 @@ dependencies { } description = 'testnorge-statisk-data-forvalter' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/testnorge-tp/build.gradle b/apps/testnorge-tp/build.gradle index 0bda6f97b35..d7e9d34845e 100644 --- a/apps/testnorge-tp/build.gradle +++ b/apps/testnorge-tp/build.gradle @@ -77,4 +77,4 @@ dependencies { } description = 'testnorge-tp' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/tilbakemelding-api/build.gradle b/apps/tilbakemelding-api/build.gradle index b0c5e3c80b7..6077158950a 100644 --- a/apps/tilbakemelding-api/build.gradle +++ b/apps/tilbakemelding-api/build.gradle @@ -83,4 +83,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index 202e281c90e..d923c3de40b 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -44,7 +44,7 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 repositories { mavenLocal() diff --git a/apps/udi-stub/build.gradle b/apps/udi-stub/build.gradle index a6616eb1e6d..53a9d193363 100644 --- a/apps/udi-stub/build.gradle +++ b/apps/udi-stub/build.gradle @@ -54,7 +54,7 @@ bootJar { archiveFileName = "app.jar" } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 repositories { mavenCentral() diff --git a/apps/varslinger-service/build.gradle b/apps/varslinger-service/build.gradle index 52fe8a7d044..7961f29dff0 100644 --- a/apps/varslinger-service/build.gradle +++ b/apps/varslinger-service/build.gradle @@ -97,4 +97,4 @@ dependencies { } description = 'varslinger-service' -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/examples/reactive-rest-example/build.gradle b/examples/reactive-rest-example/build.gradle index 9050884c186..21523561160 100644 --- a/examples/reactive-rest-example/build.gradle +++ b/examples/reactive-rest-example/build.gradle @@ -74,4 +74,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/libs/avro-schema/build.gradle b/libs/avro-schema/build.gradle index 23aa2ba2ecc..726755e88eb 100644 --- a/libs/avro-schema/build.gradle +++ b/libs/avro-schema/build.gradle @@ -20,7 +20,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 publishing { repositories { diff --git a/libs/commands/build.gradle b/libs/commands/build.gradle index bb82f60a560..a788ac8fde2 100644 --- a/libs/commands/build.gradle +++ b/libs/commands/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation "no.nav.testnav.libs:data-transfer-objects" diff --git a/libs/csv-converter/build.gradle b/libs/csv-converter/build.gradle index 88b8805c110..05499b0b3a1 100644 --- a/libs/csv-converter/build.gradle +++ b/libs/csv-converter/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'org.apache.commons:commons-csv:1.10.0' diff --git a/libs/data-transfer-objects/build.gradle b/libs/data-transfer-objects/build.gradle index 5ed8874ee7c..6f0169a47b3 100644 --- a/libs/data-transfer-objects/build.gradle +++ b/libs/data-transfer-objects/build.gradle @@ -73,7 +73,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 publishing { repositories { diff --git a/libs/database/build.gradle b/libs/database/build.gradle index b79ea03ca3f..1ead28ddab3 100644 --- a/libs/database/build.gradle +++ b/libs/database/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' diff --git a/libs/domain/build.gradle b/libs/domain/build.gradle index 78f4f0b8b4e..1022ed42309 100644 --- a/libs/domain/build.gradle +++ b/libs/domain/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/libs/integration-test/build.gradle b/libs/integration-test/build.gradle index d8290483ebc..a1a73c84f06 100644 --- a/libs/integration-test/build.gradle +++ b/libs/integration-test/build.gradle @@ -49,7 +49,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/libs/kafka-config/build.gradle b/libs/kafka-config/build.gradle index 045afff8024..e71b4562fcf 100644 --- a/libs/kafka-config/build.gradle +++ b/libs/kafka-config/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' diff --git a/libs/kafka-producers/build.gradle b/libs/kafka-producers/build.gradle index 22592b9e13d..653f9351d4a 100644 --- a/libs/kafka-producers/build.gradle +++ b/libs/kafka-producers/build.gradle @@ -43,7 +43,7 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/libs/reactive-core/build.gradle b/libs/reactive-core/build.gradle index 48b9bcf034b..f04377a2671 100644 --- a/libs/reactive-core/build.gradle +++ b/libs/reactive-core/build.gradle @@ -51,7 +51,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 publishing { repositories { diff --git a/libs/reactive-frontend/build.gradle b/libs/reactive-frontend/build.gradle index 91d7552539c..8f4245364d7 100644 --- a/libs/reactive-frontend/build.gradle +++ b/libs/reactive-frontend/build.gradle @@ -49,7 +49,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 publishing { repositories { diff --git a/libs/reactive-proxy/build.gradle b/libs/reactive-proxy/build.gradle index a16167c7cbb..d932cd2cef9 100644 --- a/libs/reactive-proxy/build.gradle +++ b/libs/reactive-proxy/build.gradle @@ -47,7 +47,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 publishing { repositories { diff --git a/libs/reactive-security/build.gradle b/libs/reactive-security/build.gradle index d984bb9c2ad..b730e4dbeb4 100644 --- a/libs/reactive-security/build.gradle +++ b/libs/reactive-security/build.gradle @@ -43,7 +43,7 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 publishing { repositories { diff --git a/libs/reactive-session-security/build.gradle b/libs/reactive-session-security/build.gradle index 2fc10070cd8..49da349b970 100644 --- a/libs/reactive-session-security/build.gradle +++ b/libs/reactive-session-security/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'com.auth0:java-jwt:4.3.0' diff --git a/libs/security-core/build.gradle b/libs/security-core/build.gradle index 9ce929345ac..bc226da6610 100644 --- a/libs/security-core/build.gradle +++ b/libs/security-core/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 tasks.named('compileJava') { inputs.files(tasks.named('processResources')) diff --git a/libs/security-token-service/build.gradle b/libs/security-token-service/build.gradle index 2a004f6b95d..cbd481fca38 100644 --- a/libs/security-token-service/build.gradle +++ b/libs/security-token-service/build.gradle @@ -39,7 +39,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'org.projectlombok:lombok' diff --git a/libs/servlet-core/build.gradle b/libs/servlet-core/build.gradle index 7803f6c2a6a..579c6b73420 100644 --- a/libs/servlet-core/build.gradle +++ b/libs/servlet-core/build.gradle @@ -45,7 +45,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/libs/servlet-insecure-security/build.gradle b/libs/servlet-insecure-security/build.gradle index fc83af83813..5f5bbd9294b 100644 --- a/libs/servlet-insecure-security/build.gradle +++ b/libs/servlet-insecure-security/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/libs/servlet-security/build.gradle b/libs/servlet-security/build.gradle index 3111e996c1c..c8da55f9378 100644 --- a/libs/servlet-security/build.gradle +++ b/libs/servlet-security/build.gradle @@ -42,7 +42,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/libs/slack/build.gradle b/libs/slack/build.gradle index b9764683121..716d6885a49 100644 --- a/libs/slack/build.gradle +++ b/libs/slack/build.gradle @@ -41,7 +41,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/libs/testing/build.gradle b/libs/testing/build.gradle index 1f706e3fb08..46098cf5215 100644 --- a/libs/testing/build.gradle +++ b/libs/testing/build.gradle @@ -42,7 +42,7 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/mocks/maskinporten-mock/build.gradle b/mocks/maskinporten-mock/build.gradle index a7634cab143..eb6ad322f8d 100644 --- a/mocks/maskinporten-mock/build.gradle +++ b/mocks/maskinporten-mock/build.gradle @@ -41,4 +41,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/mocks/tokendings-mock/build.gradle b/mocks/tokendings-mock/build.gradle index 910259d56b6..1fa57d187dc 100644 --- a/mocks/tokendings-mock/build.gradle +++ b/mocks/tokendings-mock/build.gradle @@ -41,4 +41,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/aareg-proxy/build.gradle b/proxies/aareg-proxy/build.gradle index f8a454ead16..aa00d329e81 100644 --- a/proxies/aareg-proxy/build.gradle +++ b/proxies/aareg-proxy/build.gradle @@ -71,5 +71,5 @@ dependencies { } java { - sourceCompatibility = JavaVersion.VERSION_20 + sourceCompatibility = JavaVersion.VERSION_21 } \ No newline at end of file diff --git a/proxies/aareg-synt-services-proxy/build.gradle b/proxies/aareg-synt-services-proxy/build.gradle index a7cc27c2bdf..d98b6aa93a4 100644 --- a/proxies/aareg-synt-services-proxy/build.gradle +++ b/proxies/aareg-synt-services-proxy/build.gradle @@ -63,4 +63,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/arbeidsplassencv-proxy/build.gradle b/proxies/arbeidsplassencv-proxy/build.gradle index bb9b26a5010..95411764bc1 100644 --- a/proxies/arbeidsplassencv-proxy/build.gradle +++ b/proxies/arbeidsplassencv-proxy/build.gradle @@ -70,4 +70,4 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/arena-forvalteren-proxy/build.gradle b/proxies/arena-forvalteren-proxy/build.gradle index abcbe732c31..37f6636be46 100644 --- a/proxies/arena-forvalteren-proxy/build.gradle +++ b/proxies/arena-forvalteren-proxy/build.gradle @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/batch-adeo-proxy/build.gradle b/proxies/batch-adeo-proxy/build.gradle index 226f855ed43..bef6c0826f1 100644 --- a/proxies/batch-adeo-proxy/build.gradle +++ b/proxies/batch-adeo-proxy/build.gradle @@ -64,4 +64,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/brregstub-proxy/build.gradle b/proxies/brregstub-proxy/build.gradle index 88a0d307de9..072e7bfad92 100644 --- a/proxies/brregstub-proxy/build.gradle +++ b/proxies/brregstub-proxy/build.gradle @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/dokarkiv-proxy/build.gradle b/proxies/dokarkiv-proxy/build.gradle index 9466a270116..caca7a311b6 100644 --- a/proxies/dokarkiv-proxy/build.gradle +++ b/proxies/dokarkiv-proxy/build.gradle @@ -63,4 +63,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/ereg-proxy/build.gradle b/proxies/ereg-proxy/build.gradle index 34cbebad30e..7b12d93f4de 100644 --- a/proxies/ereg-proxy/build.gradle +++ b/proxies/ereg-proxy/build.gradle @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/histark-proxy/build.gradle b/proxies/histark-proxy/build.gradle index 218f5248989..a335e091c44 100644 --- a/proxies/histark-proxy/build.gradle +++ b/proxies/histark-proxy/build.gradle @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/hodejegeren-proxy/build.gradle b/proxies/hodejegeren-proxy/build.gradle index 96da8190a10..4b85d681446 100644 --- a/proxies/hodejegeren-proxy/build.gradle +++ b/proxies/hodejegeren-proxy/build.gradle @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/inntektstub-proxy/build.gradle b/proxies/inntektstub-proxy/build.gradle index de99c297d4e..430b61b4781 100644 --- a/proxies/inntektstub-proxy/build.gradle +++ b/proxies/inntektstub-proxy/build.gradle @@ -66,4 +66,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/inst-proxy/build.gradle b/proxies/inst-proxy/build.gradle index c3071c62750..9f450a1394a 100644 --- a/proxies/inst-proxy/build.gradle +++ b/proxies/inst-proxy/build.gradle @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 \ No newline at end of file +java.sourceCompatibility = JavaVersion.VERSION_21 \ No newline at end of file diff --git a/proxies/kodeverk-proxy/build.gradle b/proxies/kodeverk-proxy/build.gradle index 7e9aaa3f145..b2722bc5129 100644 --- a/proxies/kodeverk-proxy/build.gradle +++ b/proxies/kodeverk-proxy/build.gradle @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/kontoregister-person-proxy/build.gradle b/proxies/kontoregister-person-proxy/build.gradle index 7cad01ef02a..a188daab510 100644 --- a/proxies/kontoregister-person-proxy/build.gradle +++ b/proxies/kontoregister-person-proxy/build.gradle @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/krrstub-proxy/build.gradle b/proxies/krrstub-proxy/build.gradle index 9e478793a28..59e1660f7cd 100644 --- a/proxies/krrstub-proxy/build.gradle +++ b/proxies/krrstub-proxy/build.gradle @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/medl-proxy/build.gradle b/proxies/medl-proxy/build.gradle index 753713ca51d..12f000554ef 100644 --- a/proxies/medl-proxy/build.gradle +++ b/proxies/medl-proxy/build.gradle @@ -67,4 +67,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/norg2-proxy/build.gradle b/proxies/norg2-proxy/build.gradle index 9220b7daa39..41eb8a4065a 100644 --- a/proxies/norg2-proxy/build.gradle +++ b/proxies/norg2-proxy/build.gradle @@ -60,4 +60,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/pdl-proxy/build.gradle b/proxies/pdl-proxy/build.gradle index 4e3e3a3ab28..3d6e0045cc0 100644 --- a/proxies/pdl-proxy/build.gradle +++ b/proxies/pdl-proxy/build.gradle @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/pensjon-testdata-facade-proxy/build.gradle b/proxies/pensjon-testdata-facade-proxy/build.gradle index 05adea364e5..707b33381e8 100644 --- a/proxies/pensjon-testdata-facade-proxy/build.gradle +++ b/proxies/pensjon-testdata-facade-proxy/build.gradle @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/saf-proxy/build.gradle b/proxies/saf-proxy/build.gradle index 71b0d87a876..5fa2e116a7c 100644 --- a/proxies/saf-proxy/build.gradle +++ b/proxies/saf-proxy/build.gradle @@ -68,4 +68,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/sigrunstub-proxy/build.gradle b/proxies/sigrunstub-proxy/build.gradle index 3b2b2928cd2..3ad686bdb62 100644 --- a/proxies/sigrunstub-proxy/build.gradle +++ b/proxies/sigrunstub-proxy/build.gradle @@ -65,4 +65,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/skjermingsregister-proxy/build.gradle b/proxies/skjermingsregister-proxy/build.gradle index 42acbc2258f..978b1d2ee6c 100644 --- a/proxies/skjermingsregister-proxy/build.gradle +++ b/proxies/skjermingsregister-proxy/build.gradle @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/statisk-data-forvalter-proxy/build.gradle b/proxies/statisk-data-forvalter-proxy/build.gradle index 7c895ccabc3..a27c8b52552 100644 --- a/proxies/statisk-data-forvalter-proxy/build.gradle +++ b/proxies/statisk-data-forvalter-proxy/build.gradle @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/proxies/synthdata-meldekort-proxy/build.gradle b/proxies/synthdata-meldekort-proxy/build.gradle index 72b932ea708..70ab5fc51ba 100644 --- a/proxies/synthdata-meldekort-proxy/build.gradle +++ b/proxies/synthdata-meldekort-proxy/build.gradle @@ -73,4 +73,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 \ No newline at end of file +java.sourceCompatibility = JavaVersion.VERSION_21 \ No newline at end of file diff --git a/proxies/tps-forvalteren-proxy/build.gradle b/proxies/tps-forvalteren-proxy/build.gradle index 1cbfedab56c..655757df856 100644 --- a/proxies/tps-forvalteren-proxy/build.gradle +++ b/proxies/tps-forvalteren-proxy/build.gradle @@ -48,7 +48,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { diff --git a/proxies/udistub-proxy/build.gradle b/proxies/udistub-proxy/build.gradle index 1fe803d46f5..103f162ec22 100644 --- a/proxies/udistub-proxy/build.gradle +++ b/proxies/udistub-proxy/build.gradle @@ -69,4 +69,4 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 diff --git a/xsd/arbeidsforhold-xsd/build.gradle b/xsd/arbeidsforhold-xsd/build.gradle index e3e5a7e84bb..0cb08210f15 100644 --- a/xsd/arbeidsforhold-xsd/build.gradle +++ b/xsd/arbeidsforhold-xsd/build.gradle @@ -15,7 +15,7 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_20 +java.sourceCompatibility = JavaVersion.VERSION_21 dependencies { implementation 'jakarta.activation:jakarta.activation-api:2.1.2' From a512dc1c672cb6c9cd7ee1082024f41dbdf477fc Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 9 Oct 2023 11:22:22 +0200 Subject: [PATCH 04/18] Oppgradert gradle til versjon 8.4 --- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../dolly-backend/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/dollystatus/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../pdl-forvalter/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/profil-api/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/synt-sykemelding-api/build.gradle | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- apps/udi-stub/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- gradle/wrapper/gradle-wrapper.properties | 7 ++----- libs/avro-schema/gradle/wrapper/gradle-wrapper.properties | 2 +- libs/commands/gradle/wrapper/gradle-wrapper.properties | 2 +- .../csv-converter/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/database/gradle/wrapper/gradle-wrapper.properties | 2 +- libs/domain/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/kafka-config/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../reactive-core/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../security-core/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/servlet-core/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- libs/slack/gradle/wrapper/gradle-wrapper.properties | 2 +- libs/testing/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../ereg-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../histark-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../inst-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../krrstub-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../medl-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../norg2-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- .../udistub-proxy/gradle/wrapper/gradle-wrapper.properties | 2 +- .../gradle/wrapper/gradle-wrapper.properties | 2 +- 108 files changed, 109 insertions(+), 112 deletions(-) diff --git a/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties b/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/adresse-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/amelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties b/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/app-tilgang-analyse-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties b/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/arbeidsforhold-export-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties b/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties b/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/batch-bestilling-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties b/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties +++ b/apps/brreg-stub/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties b/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/bruker-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties b/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties index f66d1f62fff..744c64d1277 100644 --- a/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dolly-backend/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dolly-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties b/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties +++ b/apps/dollystatus/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/endringsmelding-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/endringsmelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties b/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/ereg-batch-status-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/faste-data-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-arbeidsforhold-populasjon-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-navn-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-organisasjon-populasjon-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/generer-synt-amelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties b/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/geografiske-kodeverk-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties b/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/helsepersonell-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties b/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties +++ b/apps/hodejegeren/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties b/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/import-person-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties b/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/inntektsmelding-generator-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties b/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/inntektsmelding-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties b/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/jenkins-batch-status-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties b/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/joark-dokument-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties b/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/miljoer-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties b/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/mn-synt-arbeidsforhold-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties b/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/oppsummeringsdokument-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-bestilling-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-bestilling-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-bestilling-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-bestilling-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-faste-data-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-forvalter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-mottak-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-tilgang-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties b/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties b/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/orgnummer-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties b/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/apps/oversikt-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties b/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties +++ b/apps/pdl-forvalter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties b/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-export-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-faste-data-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-organisasjon-tilgang-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-search-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/person-service/gradle/wrapper/gradle-wrapper.properties b/apps/person-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/person-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/person-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/profil-api/gradle/wrapper/gradle-wrapper.properties b/apps/profil-api/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/profil-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/profil-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties b/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/sykemelding-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index f1dfbdb3e6f..4309a1d13be 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -61,7 +61,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.springframework.boot:spring-boot-starter-security' - + implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.boot:spring-boot-starter-actuator' diff --git a/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties b/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/synt-sykemelding-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties b/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/synt-vedtakshistorikk-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties b/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnav-ident-pool/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties b/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnorge-bisys/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties b/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnorge-statisk-data-forvalter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties b/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties +++ b/apps/testnorge-tp/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties b/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties +++ b/apps/tilbakemelding-api/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties b/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/tps-messaging-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties b/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties +++ b/apps/udi-stub/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties b/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties +++ b/apps/varslinger-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties b/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties +++ b/examples/reactive-rest-example/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index a35053677cc..cf58316ee06 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,9 +1,6 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip networkTimeout=10000 zipStoreBase=GRADLE_USER_HOME -zipStorePath=wrapper/dists - -# https://gradle.org/release-checksums/ -distributionSha256Sum=ff7bf6a86f09b9b2c40bb8f48b25fc19cf2b2664fd1d220cd7ab833ec758d0d7 \ No newline at end of file +zipStorePath=wrapper/dists \ No newline at end of file diff --git a/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties b/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties +++ b/libs/avro-schema/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/commands/gradle/wrapper/gradle-wrapper.properties b/libs/commands/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/commands/gradle/wrapper/gradle-wrapper.properties +++ b/libs/commands/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties b/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties +++ b/libs/csv-converter/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties b/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties +++ b/libs/data-transfer-objects/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/database/gradle/wrapper/gradle-wrapper.properties b/libs/database/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/database/gradle/wrapper/gradle-wrapper.properties +++ b/libs/database/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/domain/gradle/wrapper/gradle-wrapper.properties b/libs/domain/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/domain/gradle/wrapper/gradle-wrapper.properties +++ b/libs/domain/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/integration-test/gradle/wrapper/gradle-wrapper.properties b/libs/integration-test/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/integration-test/gradle/wrapper/gradle-wrapper.properties +++ b/libs/integration-test/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties b/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties +++ b/libs/kafka-config/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties b/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties +++ b/libs/kafka-producers/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-core/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-frontend/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties b/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/reactive-session-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/security-core/gradle/wrapper/gradle-wrapper.properties b/libs/security-core/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/security-core/gradle/wrapper/gradle-wrapper.properties +++ b/libs/security-core/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties b/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties +++ b/libs/security-token-service/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties b/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties +++ b/libs/servlet-core/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties b/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/servlet-insecure-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties b/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties +++ b/libs/servlet-security/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/slack/gradle/wrapper/gradle-wrapper.properties b/libs/slack/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/slack/gradle/wrapper/gradle-wrapper.properties +++ b/libs/slack/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/libs/testing/gradle/wrapper/gradle-wrapper.properties b/libs/testing/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/libs/testing/gradle/wrapper/gradle-wrapper.properties +++ b/libs/testing/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties b/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties +++ b/mocks/maskinporten-mock/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties b/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties +++ b/mocks/tokendings-mock/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/aareg-synt-services-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/arena-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/batch-adeo-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/brregstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/dokarkiv-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/ereg-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/histark-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/hodejegeren-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/inntektstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/inst-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/kodeverk-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/kontoregister-person-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/krrstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/medl-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/norg2-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/pdl-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/pensjon-testdata-facade-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/saf-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/sigrunstub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/skjermingsregister-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/statisk-data-forvalter-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/synthdata-meldekort-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/tps-forvalteren-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties b/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties +++ b/proxies/udistub-proxy/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists diff --git a/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties b/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties index e381c1fb3a7..e411586a54a 100644 --- a/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties +++ b/xsd/arbeidsforhold-xsd/gradle/wrapper/gradle-wrapper.properties @@ -1,5 +1,5 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-rc-3-bin.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-8.4-bin.zip zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists From 21e98e9d04cc82e5863db16122f80332afc0071b Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 9 Oct 2023 11:34:03 +0200 Subject: [PATCH 05/18] Lagt til toolchain java oppsett --- apps/adresse-service/build.gradle | 6 +++++- apps/amelding-service/build.gradle | 6 +++++- apps/app-tilgang-analyse-service/build.gradle | 6 +++++- apps/arbeidsforhold-export-api/build.gradle | 6 +++++- apps/arbeidsforhold-service/build.gradle | 6 +++++- apps/batch-bestilling-service/build.gradle | 6 +++++- apps/brreg-stub/build.gradle | 6 +++++- apps/bruker-service/build.gradle | 6 +++++- apps/dolly-backend/build.gradle | 6 +++++- apps/dolly-frontend/build.gradle | 6 +++++- apps/dollystatus/build.gradle | 6 +++++- apps/endringsmelding-frontend/build.gradle | 6 +++++- apps/endringsmelding-service/build.gradle | 6 +++++- apps/ereg-batch-status-service/build.gradle | 6 +++++- apps/faste-data-frontend/build.gradle | 6 +++++- apps/generer-arbeidsforhold-populasjon-service/build.gradle | 6 +++++- apps/generer-navn-service/build.gradle | 6 +++++- apps/generer-organisasjon-populasjon-service/build.gradle | 6 +++++- apps/generer-synt-amelding-service/build.gradle | 6 +++++- apps/geografiske-kodeverk-service/build.gradle | 6 +++++- apps/helsepersonell-service/build.gradle | 6 +++++- apps/hodejegeren/build.gradle | 6 +++++- apps/import-person-service/build.gradle | 6 +++++- apps/inntektsmelding-generator-service/build.gradle | 6 +++++- apps/inntektsmelding-service/build.gradle | 6 +++++- apps/jenkins-batch-status-service/build.gradle | 6 +++++- apps/joark-dokument-service/build.gradle | 6 +++++- apps/miljoer-service/build.gradle | 6 +++++- apps/mn-synt-arbeidsforhold-service/build.gradle | 6 +++++- apps/oppsummeringsdokument-service/build.gradle | 6 +++++- apps/organisasjon-bestilling-service/build.gradle | 6 +++++- apps/organisasjon-faste-data-service/build.gradle | 6 +++++- apps/organisasjon-forvalter/build.gradle | 6 +++++- apps/organisasjon-mottak-service/build.gradle | 6 +++++- apps/organisasjon-service/build.gradle | 6 +++++- apps/organisasjon-tilgang-frontend/build.gradle | 6 +++++- apps/organisasjon-tilgang-service/build.gradle | 6 +++++- apps/orgnummer-service/build.gradle | 6 +++++- apps/oversikt-frontend/build.gradle | 6 +++++- apps/pdl-forvalter/build.gradle | 6 +++++- apps/person-export-api/build.gradle | 6 +++++- apps/person-faste-data-service/build.gradle | 6 +++++- apps/person-organisasjon-tilgang-service/build.gradle | 6 +++++- apps/person-search-service/build.gradle | 6 +++++- apps/person-service/build.gradle | 6 +++++- apps/profil-api/build.gradle | 6 +++++- apps/sykemelding-api/build.gradle | 6 +++++- apps/synt-sykemelding-api/build.gradle | 6 +++++- apps/synt-vedtakshistorikk-service/build.gradle | 6 +++++- apps/testnav-ident-pool/build.gradle | 6 +++++- apps/testnorge-bisys/build.gradle | 6 +++++- apps/testnorge-statisk-data-forvalter/build.gradle | 6 +++++- apps/testnorge-tp/build.gradle | 6 +++++- apps/tilbakemelding-api/build.gradle | 6 +++++- apps/tps-messaging-service/build.gradle | 6 +++++- apps/udi-stub/build.gradle | 6 +++++- apps/varslinger-service/build.gradle | 6 +++++- examples/reactive-rest-example/build.gradle | 6 +++++- libs/avro-schema/build.gradle | 6 +++++- libs/commands/build.gradle | 6 +++++- libs/csv-converter/build.gradle | 6 +++++- libs/data-transfer-objects/build.gradle | 6 +++++- libs/database/build.gradle | 6 +++++- libs/domain/build.gradle | 6 +++++- libs/integration-test/build.gradle | 6 +++++- libs/kafka-config/build.gradle | 6 +++++- libs/kafka-producers/build.gradle | 6 +++++- libs/reactive-core/build.gradle | 6 +++++- libs/reactive-frontend/build.gradle | 6 +++++- libs/reactive-proxy/build.gradle | 6 +++++- libs/reactive-security/build.gradle | 6 +++++- libs/reactive-session-security/build.gradle | 6 +++++- libs/security-core/build.gradle | 6 +++++- libs/security-token-service/build.gradle | 6 +++++- libs/servlet-core/build.gradle | 6 +++++- libs/servlet-insecure-security/build.gradle | 6 +++++- libs/servlet-security/build.gradle | 6 +++++- libs/slack/build.gradle | 6 +++++- libs/testing/build.gradle | 6 +++++- mocks/maskinporten-mock/build.gradle | 6 +++++- mocks/tokendings-mock/build.gradle | 6 +++++- proxies/aareg-synt-services-proxy/build.gradle | 6 +++++- proxies/arbeidsplassencv-proxy/build.gradle | 6 +++++- proxies/arena-forvalteren-proxy/build.gradle | 6 +++++- proxies/batch-adeo-proxy/build.gradle | 6 +++++- proxies/brregstub-proxy/build.gradle | 6 +++++- proxies/dokarkiv-proxy/build.gradle | 6 +++++- proxies/ereg-proxy/build.gradle | 6 +++++- proxies/histark-proxy/build.gradle | 6 +++++- proxies/hodejegeren-proxy/build.gradle | 6 +++++- proxies/inntektstub-proxy/build.gradle | 6 +++++- proxies/inst-proxy/build.gradle | 6 +++++- proxies/kodeverk-proxy/build.gradle | 6 +++++- proxies/kontoregister-person-proxy/build.gradle | 6 +++++- proxies/krrstub-proxy/build.gradle | 6 +++++- proxies/medl-proxy/build.gradle | 6 +++++- proxies/norg2-proxy/build.gradle | 6 +++++- proxies/pdl-proxy/build.gradle | 6 +++++- proxies/pensjon-testdata-facade-proxy/build.gradle | 6 +++++- proxies/saf-proxy/build.gradle | 6 +++++- proxies/sigrunstub-proxy/build.gradle | 6 +++++- proxies/skjermingsregister-proxy/build.gradle | 6 +++++- proxies/statisk-data-forvalter-proxy/build.gradle | 6 +++++- proxies/synthdata-meldekort-proxy/build.gradle | 6 +++++- proxies/tps-forvalteren-proxy/build.gradle | 6 +++++- proxies/udistub-proxy/build.gradle | 6 +++++- xsd/arbeidsforhold-xsd/build.gradle | 6 +++++- 107 files changed, 535 insertions(+), 107 deletions(-) diff --git a/apps/adresse-service/build.gradle b/apps/adresse-service/build.gradle index e6eb7a087a8..3a1a3b7386a 100644 --- a/apps/adresse-service/build.gradle +++ b/apps/adresse-service/build.gradle @@ -77,4 +77,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/amelding-service/build.gradle b/apps/amelding-service/build.gradle index a3ae65d1994..f2f1c166a23 100644 --- a/apps/amelding-service/build.gradle +++ b/apps/amelding-service/build.gradle @@ -82,4 +82,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/app-tilgang-analyse-service/build.gradle b/apps/app-tilgang-analyse-service/build.gradle index a800ba781a7..33a1f4997cc 100644 --- a/apps/app-tilgang-analyse-service/build.gradle +++ b/apps/app-tilgang-analyse-service/build.gradle @@ -79,4 +79,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/arbeidsforhold-export-api/build.gradle b/apps/arbeidsforhold-export-api/build.gradle index 9cd4bd2ae93..9ea20dbcbb4 100644 --- a/apps/arbeidsforhold-export-api/build.gradle +++ b/apps/arbeidsforhold-export-api/build.gradle @@ -85,4 +85,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/arbeidsforhold-service/build.gradle b/apps/arbeidsforhold-service/build.gradle index 26efb522e81..e1d77f5772b 100644 --- a/apps/arbeidsforhold-service/build.gradle +++ b/apps/arbeidsforhold-service/build.gradle @@ -94,4 +94,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/batch-bestilling-service/build.gradle b/apps/batch-bestilling-service/build.gradle index ac5d823252d..1b618df8908 100644 --- a/apps/batch-bestilling-service/build.gradle +++ b/apps/batch-bestilling-service/build.gradle @@ -80,4 +80,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index 21c1588004a..4d31579de58 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -121,4 +121,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/bruker-service/build.gradle b/apps/bruker-service/build.gradle index 758b31bc4b2..2c9827f9ec0 100644 --- a/apps/bruker-service/build.gradle +++ b/apps/bruker-service/build.gradle @@ -100,4 +100,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 283460d43b7..acbcf96cec7 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -45,7 +45,11 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { mavenCentral() diff --git a/apps/dolly-frontend/build.gradle b/apps/dolly-frontend/build.gradle index aa13ad0b5c7..72056d7b835 100644 --- a/apps/dolly-frontend/build.gradle +++ b/apps/dolly-frontend/build.gradle @@ -56,7 +56,11 @@ configurations { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/apps/dollystatus/build.gradle b/apps/dollystatus/build.gradle index 834d7a3e61d..0c76b005c74 100644 --- a/apps/dollystatus/build.gradle +++ b/apps/dollystatus/build.gradle @@ -46,4 +46,8 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/endringsmelding-frontend/build.gradle b/apps/endringsmelding-frontend/build.gradle index cdcbed06abc..c4f97696e98 100644 --- a/apps/endringsmelding-frontend/build.gradle +++ b/apps/endringsmelding-frontend/build.gradle @@ -88,4 +88,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/endringsmelding-service/build.gradle b/apps/endringsmelding-service/build.gradle index 3e5c904fd34..d9fe942d72b 100644 --- a/apps/endringsmelding-service/build.gradle +++ b/apps/endringsmelding-service/build.gradle @@ -68,4 +68,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index 72146c8b95c..55756d8f27d 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -79,4 +79,8 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/faste-data-frontend/build.gradle b/apps/faste-data-frontend/build.gradle index ed1f63635ea..bff21a7443b 100644 --- a/apps/faste-data-frontend/build.gradle +++ b/apps/faste-data-frontend/build.gradle @@ -88,4 +88,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/generer-arbeidsforhold-populasjon-service/build.gradle b/apps/generer-arbeidsforhold-populasjon-service/build.gradle index 390f5041b06..f87fc00d929 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/build.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/build.gradle @@ -77,4 +77,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/generer-navn-service/build.gradle b/apps/generer-navn-service/build.gradle index 71ffc410c03..044be5d8123 100644 --- a/apps/generer-navn-service/build.gradle +++ b/apps/generer-navn-service/build.gradle @@ -76,4 +76,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/generer-organisasjon-populasjon-service/build.gradle b/apps/generer-organisasjon-populasjon-service/build.gradle index b81cfa75191..1dba0143625 100644 --- a/apps/generer-organisasjon-populasjon-service/build.gradle +++ b/apps/generer-organisasjon-populasjon-service/build.gradle @@ -97,4 +97,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/generer-synt-amelding-service/build.gradle b/apps/generer-synt-amelding-service/build.gradle index b4b57238632..b16667276e3 100644 --- a/apps/generer-synt-amelding-service/build.gradle +++ b/apps/generer-synt-amelding-service/build.gradle @@ -72,4 +72,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/geografiske-kodeverk-service/build.gradle b/apps/geografiske-kodeverk-service/build.gradle index 06a561d8f83..049451fc75d 100644 --- a/apps/geografiske-kodeverk-service/build.gradle +++ b/apps/geografiske-kodeverk-service/build.gradle @@ -80,4 +80,8 @@ dependencies { } description = 'geografiske-kodeverk-service' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/helsepersonell-service/build.gradle b/apps/helsepersonell-service/build.gradle index 888e8dc533f..e46e3bf0398 100644 --- a/apps/helsepersonell-service/build.gradle +++ b/apps/helsepersonell-service/build.gradle @@ -76,4 +76,8 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 \ No newline at end of file +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} \ No newline at end of file diff --git a/apps/hodejegeren/build.gradle b/apps/hodejegeren/build.gradle index bc6e0c5e47d..6ee476953bb 100644 --- a/apps/hodejegeren/build.gradle +++ b/apps/hodejegeren/build.gradle @@ -90,4 +90,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/import-person-service/build.gradle b/apps/import-person-service/build.gradle index bc40a4c85d0..8b1715c7234 100644 --- a/apps/import-person-service/build.gradle +++ b/apps/import-person-service/build.gradle @@ -82,4 +82,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/inntektsmelding-generator-service/build.gradle b/apps/inntektsmelding-generator-service/build.gradle index 0c64b5f7be1..e2c04ec0dfa 100644 --- a/apps/inntektsmelding-generator-service/build.gradle +++ b/apps/inntektsmelding-generator-service/build.gradle @@ -84,4 +84,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/inntektsmelding-service/build.gradle b/apps/inntektsmelding-service/build.gradle index cb3208f0eff..1d0881a6ec4 100644 --- a/apps/inntektsmelding-service/build.gradle +++ b/apps/inntektsmelding-service/build.gradle @@ -94,4 +94,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/jenkins-batch-status-service/build.gradle b/apps/jenkins-batch-status-service/build.gradle index d72b5dd85fd..0c276944048 100644 --- a/apps/jenkins-batch-status-service/build.gradle +++ b/apps/jenkins-batch-status-service/build.gradle @@ -80,4 +80,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/joark-dokument-service/build.gradle b/apps/joark-dokument-service/build.gradle index ccf58101844..466103458cd 100644 --- a/apps/joark-dokument-service/build.gradle +++ b/apps/joark-dokument-service/build.gradle @@ -77,4 +77,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/miljoer-service/build.gradle b/apps/miljoer-service/build.gradle index 5e5f79f74d8..0ad7b1d37a3 100644 --- a/apps/miljoer-service/build.gradle +++ b/apps/miljoer-service/build.gradle @@ -78,4 +78,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/mn-synt-arbeidsforhold-service/build.gradle b/apps/mn-synt-arbeidsforhold-service/build.gradle index c11b0a58eec..3674c30256e 100644 --- a/apps/mn-synt-arbeidsforhold-service/build.gradle +++ b/apps/mn-synt-arbeidsforhold-service/build.gradle @@ -88,4 +88,8 @@ dependencies { } description = 'mn-synt-arbeidsforhold-service' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index 2b5eb4accb7..77c5ea512f2 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -106,4 +106,8 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/organisasjon-bestilling-service/build.gradle b/apps/organisasjon-bestilling-service/build.gradle index fcf7aa12dfc..4ba56ef5698 100644 --- a/apps/organisasjon-bestilling-service/build.gradle +++ b/apps/organisasjon-bestilling-service/build.gradle @@ -87,4 +87,8 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/organisasjon-faste-data-service/build.gradle b/apps/organisasjon-faste-data-service/build.gradle index 35f92d4b93f..8d074328abf 100644 --- a/apps/organisasjon-faste-data-service/build.gradle +++ b/apps/organisasjon-faste-data-service/build.gradle @@ -95,4 +95,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/organisasjon-forvalter/build.gradle b/apps/organisasjon-forvalter/build.gradle index e87b237a30a..f7f5a36ea7b 100644 --- a/apps/organisasjon-forvalter/build.gradle +++ b/apps/organisasjon-forvalter/build.gradle @@ -56,7 +56,11 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/apps/organisasjon-mottak-service/build.gradle b/apps/organisasjon-mottak-service/build.gradle index 9900d1d2aba..2773e2f1a4f 100644 --- a/apps/organisasjon-mottak-service/build.gradle +++ b/apps/organisasjon-mottak-service/build.gradle @@ -89,4 +89,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/organisasjon-service/build.gradle b/apps/organisasjon-service/build.gradle index 84aa849a403..30902fb0c26 100644 --- a/apps/organisasjon-service/build.gradle +++ b/apps/organisasjon-service/build.gradle @@ -80,4 +80,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/organisasjon-tilgang-frontend/build.gradle b/apps/organisasjon-tilgang-frontend/build.gradle index cb3eb1cf2cb..a2c5dcabf6d 100644 --- a/apps/organisasjon-tilgang-frontend/build.gradle +++ b/apps/organisasjon-tilgang-frontend/build.gradle @@ -83,4 +83,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/organisasjon-tilgang-service/build.gradle b/apps/organisasjon-tilgang-service/build.gradle index 336dca11cbc..9581fd68608 100644 --- a/apps/organisasjon-tilgang-service/build.gradle +++ b/apps/organisasjon-tilgang-service/build.gradle @@ -32,7 +32,11 @@ sonarqube { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} bootJar { archiveFileName = "app.jar" diff --git a/apps/orgnummer-service/build.gradle b/apps/orgnummer-service/build.gradle index f75a431cbb3..d9f8dbfefa0 100644 --- a/apps/orgnummer-service/build.gradle +++ b/apps/orgnummer-service/build.gradle @@ -88,4 +88,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/oversikt-frontend/build.gradle b/apps/oversikt-frontend/build.gradle index f9fc51092f7..a4867c3d22f 100644 --- a/apps/oversikt-frontend/build.gradle +++ b/apps/oversikt-frontend/build.gradle @@ -81,4 +81,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/pdl-forvalter/build.gradle b/apps/pdl-forvalter/build.gradle index 7e798b6f20e..ce36c5f2d3e 100644 --- a/apps/pdl-forvalter/build.gradle +++ b/apps/pdl-forvalter/build.gradle @@ -55,7 +55,11 @@ repositories { } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/apps/person-export-api/build.gradle b/apps/person-export-api/build.gradle index 5c337fa192c..70a2e5cce04 100644 --- a/apps/person-export-api/build.gradle +++ b/apps/person-export-api/build.gradle @@ -81,4 +81,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/person-faste-data-service/build.gradle b/apps/person-faste-data-service/build.gradle index 05d796fd770..56edd87eb81 100644 --- a/apps/person-faste-data-service/build.gradle +++ b/apps/person-faste-data-service/build.gradle @@ -82,4 +82,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/person-organisasjon-tilgang-service/build.gradle b/apps/person-organisasjon-tilgang-service/build.gradle index 968d311b9ff..cc7194355b6 100644 --- a/apps/person-organisasjon-tilgang-service/build.gradle +++ b/apps/person-organisasjon-tilgang-service/build.gradle @@ -43,7 +43,11 @@ sonarqube { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} bootJar { archiveFileName = "app.jar" diff --git a/apps/person-search-service/build.gradle b/apps/person-search-service/build.gradle index fccdda01212..3c3f6225fab 100644 --- a/apps/person-search-service/build.gradle +++ b/apps/person-search-service/build.gradle @@ -44,7 +44,11 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { mavenCentral() diff --git a/apps/person-service/build.gradle b/apps/person-service/build.gradle index 9a65414826d..c1b8970cddb 100644 --- a/apps/person-service/build.gradle +++ b/apps/person-service/build.gradle @@ -42,7 +42,11 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { mavenCentral() diff --git a/apps/profil-api/build.gradle b/apps/profil-api/build.gradle index 4c7f976f85b..1d82b4c3d4a 100644 --- a/apps/profil-api/build.gradle +++ b/apps/profil-api/build.gradle @@ -81,4 +81,8 @@ dependencies { } description = 'profil-api' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/sykemelding-api/build.gradle b/apps/sykemelding-api/build.gradle index a4315e02c59..cee61eb8767 100644 --- a/apps/sykemelding-api/build.gradle +++ b/apps/sykemelding-api/build.gradle @@ -98,4 +98,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index 4309a1d13be..96c2f8e2edc 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -81,4 +81,8 @@ dependencies { testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/synt-vedtakshistorikk-service/build.gradle b/apps/synt-vedtakshistorikk-service/build.gradle index 4c91ca5f0a3..1787ffcc3e1 100644 --- a/apps/synt-vedtakshistorikk-service/build.gradle +++ b/apps/synt-vedtakshistorikk-service/build.gradle @@ -47,7 +47,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'no.nav.testnav.libs:servlet-core' diff --git a/apps/testnav-ident-pool/build.gradle b/apps/testnav-ident-pool/build.gradle index 1fc293efcda..41a8d67c400 100644 --- a/apps/testnav-ident-pool/build.gradle +++ b/apps/testnav-ident-pool/build.gradle @@ -65,7 +65,11 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/apps/testnorge-bisys/build.gradle b/apps/testnorge-bisys/build.gradle index 3802d7855d5..9ae2c253201 100644 --- a/apps/testnorge-bisys/build.gradle +++ b/apps/testnorge-bisys/build.gradle @@ -96,4 +96,8 @@ dependencies { } description = 'testnorge-bisys' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/testnorge-statisk-data-forvalter/build.gradle b/apps/testnorge-statisk-data-forvalter/build.gradle index fe319e18029..21a714a8906 100644 --- a/apps/testnorge-statisk-data-forvalter/build.gradle +++ b/apps/testnorge-statisk-data-forvalter/build.gradle @@ -107,4 +107,8 @@ dependencies { } description = 'testnorge-statisk-data-forvalter' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/testnorge-tp/build.gradle b/apps/testnorge-tp/build.gradle index d7e9d34845e..6a10b95f345 100644 --- a/apps/testnorge-tp/build.gradle +++ b/apps/testnorge-tp/build.gradle @@ -77,4 +77,8 @@ dependencies { } description = 'testnorge-tp' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/tilbakemelding-api/build.gradle b/apps/tilbakemelding-api/build.gradle index 6077158950a..1873453bbb5 100644 --- a/apps/tilbakemelding-api/build.gradle +++ b/apps/tilbakemelding-api/build.gradle @@ -83,4 +83,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index d923c3de40b..30bb9c20429 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -44,7 +44,11 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { mavenLocal() diff --git a/apps/udi-stub/build.gradle b/apps/udi-stub/build.gradle index 53a9d193363..6308834f35c 100644 --- a/apps/udi-stub/build.gradle +++ b/apps/udi-stub/build.gradle @@ -54,7 +54,11 @@ bootJar { archiveFileName = "app.jar" } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} repositories { mavenCentral() diff --git a/apps/varslinger-service/build.gradle b/apps/varslinger-service/build.gradle index 7961f29dff0..e8c88cdc4a3 100644 --- a/apps/varslinger-service/build.gradle +++ b/apps/varslinger-service/build.gradle @@ -97,4 +97,8 @@ dependencies { } description = 'varslinger-service' -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/examples/reactive-rest-example/build.gradle b/examples/reactive-rest-example/build.gradle index 21523561160..c8ed3c58d34 100644 --- a/examples/reactive-rest-example/build.gradle +++ b/examples/reactive-rest-example/build.gradle @@ -74,4 +74,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/libs/avro-schema/build.gradle b/libs/avro-schema/build.gradle index 726755e88eb..0d223b5be0c 100644 --- a/libs/avro-schema/build.gradle +++ b/libs/avro-schema/build.gradle @@ -20,7 +20,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} publishing { repositories { diff --git a/libs/commands/build.gradle b/libs/commands/build.gradle index a788ac8fde2..d0e146aa6cf 100644 --- a/libs/commands/build.gradle +++ b/libs/commands/build.gradle @@ -41,7 +41,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation "no.nav.testnav.libs:data-transfer-objects" diff --git a/libs/csv-converter/build.gradle b/libs/csv-converter/build.gradle index 05499b0b3a1..0ca2de7c44a 100644 --- a/libs/csv-converter/build.gradle +++ b/libs/csv-converter/build.gradle @@ -41,7 +41,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'org.apache.commons:commons-csv:1.10.0' diff --git a/libs/data-transfer-objects/build.gradle b/libs/data-transfer-objects/build.gradle index 6f0169a47b3..34b9232f85d 100644 --- a/libs/data-transfer-objects/build.gradle +++ b/libs/data-transfer-objects/build.gradle @@ -73,7 +73,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} publishing { repositories { diff --git a/libs/database/build.gradle b/libs/database/build.gradle index 1ead28ddab3..c7f824cb616 100644 --- a/libs/database/build.gradle +++ b/libs/database/build.gradle @@ -42,7 +42,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'org.springframework.boot:spring-boot-starter-data-jpa' diff --git a/libs/domain/build.gradle b/libs/domain/build.gradle index 1022ed42309..6c6b995979d 100644 --- a/libs/domain/build.gradle +++ b/libs/domain/build.gradle @@ -41,7 +41,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/libs/integration-test/build.gradle b/libs/integration-test/build.gradle index a1a73c84f06..0eb79a9af11 100644 --- a/libs/integration-test/build.gradle +++ b/libs/integration-test/build.gradle @@ -49,7 +49,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'no.nav.testnav.libs:security-core' diff --git a/libs/kafka-config/build.gradle b/libs/kafka-config/build.gradle index e71b4562fcf..66d1ab34c6f 100644 --- a/libs/kafka-config/build.gradle +++ b/libs/kafka-config/build.gradle @@ -42,7 +42,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' diff --git a/libs/kafka-producers/build.gradle b/libs/kafka-producers/build.gradle index 653f9351d4a..63bb024376e 100644 --- a/libs/kafka-producers/build.gradle +++ b/libs/kafka-producers/build.gradle @@ -43,7 +43,11 @@ repositories { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/libs/reactive-core/build.gradle b/libs/reactive-core/build.gradle index f04377a2671..d0abafc1602 100644 --- a/libs/reactive-core/build.gradle +++ b/libs/reactive-core/build.gradle @@ -51,7 +51,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} publishing { repositories { diff --git a/libs/reactive-frontend/build.gradle b/libs/reactive-frontend/build.gradle index 8f4245364d7..4607ddca621 100644 --- a/libs/reactive-frontend/build.gradle +++ b/libs/reactive-frontend/build.gradle @@ -49,7 +49,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} publishing { repositories { diff --git a/libs/reactive-proxy/build.gradle b/libs/reactive-proxy/build.gradle index d932cd2cef9..f959d6e4ed5 100644 --- a/libs/reactive-proxy/build.gradle +++ b/libs/reactive-proxy/build.gradle @@ -47,7 +47,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} publishing { repositories { diff --git a/libs/reactive-security/build.gradle b/libs/reactive-security/build.gradle index b730e4dbeb4..a69f4d3095e 100644 --- a/libs/reactive-security/build.gradle +++ b/libs/reactive-security/build.gradle @@ -43,7 +43,11 @@ if (project.hasProperty("releaseVersion")) { version = releaseVersion } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} publishing { repositories { diff --git a/libs/reactive-session-security/build.gradle b/libs/reactive-session-security/build.gradle index 49da349b970..d4f9044cffa 100644 --- a/libs/reactive-session-security/build.gradle +++ b/libs/reactive-session-security/build.gradle @@ -42,7 +42,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'com.auth0:java-jwt:4.3.0' diff --git a/libs/security-core/build.gradle b/libs/security-core/build.gradle index bc226da6610..0fa7e98a243 100644 --- a/libs/security-core/build.gradle +++ b/libs/security-core/build.gradle @@ -41,7 +41,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} tasks.named('compileJava') { inputs.files(tasks.named('processResources')) diff --git a/libs/security-token-service/build.gradle b/libs/security-token-service/build.gradle index cbd481fca38..5cbaf72b6f1 100644 --- a/libs/security-token-service/build.gradle +++ b/libs/security-token-service/build.gradle @@ -39,7 +39,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'org.projectlombok:lombok' diff --git a/libs/servlet-core/build.gradle b/libs/servlet-core/build.gradle index 579c6b73420..5223aa06410 100644 --- a/libs/servlet-core/build.gradle +++ b/libs/servlet-core/build.gradle @@ -45,7 +45,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/libs/servlet-insecure-security/build.gradle b/libs/servlet-insecure-security/build.gradle index 5f5bbd9294b..b47ed0e8601 100644 --- a/libs/servlet-insecure-security/build.gradle +++ b/libs/servlet-insecure-security/build.gradle @@ -41,7 +41,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/libs/servlet-security/build.gradle b/libs/servlet-security/build.gradle index c8da55f9378..058d9071442 100644 --- a/libs/servlet-security/build.gradle +++ b/libs/servlet-security/build.gradle @@ -42,7 +42,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/libs/slack/build.gradle b/libs/slack/build.gradle index 716d6885a49..1e24d87ae6b 100644 --- a/libs/slack/build.gradle +++ b/libs/slack/build.gradle @@ -41,7 +41,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/libs/testing/build.gradle b/libs/testing/build.gradle index 46098cf5215..cd6d8727ad7 100644 --- a/libs/testing/build.gradle +++ b/libs/testing/build.gradle @@ -42,7 +42,11 @@ dependencyManagement { } } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/mocks/maskinporten-mock/build.gradle b/mocks/maskinporten-mock/build.gradle index eb6ad322f8d..22784e777bb 100644 --- a/mocks/maskinporten-mock/build.gradle +++ b/mocks/maskinporten-mock/build.gradle @@ -41,4 +41,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/mocks/tokendings-mock/build.gradle b/mocks/tokendings-mock/build.gradle index 1fa57d187dc..f620c5737de 100644 --- a/mocks/tokendings-mock/build.gradle +++ b/mocks/tokendings-mock/build.gradle @@ -41,4 +41,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/aareg-synt-services-proxy/build.gradle b/proxies/aareg-synt-services-proxy/build.gradle index d98b6aa93a4..ce4eda3631d 100644 --- a/proxies/aareg-synt-services-proxy/build.gradle +++ b/proxies/aareg-synt-services-proxy/build.gradle @@ -63,4 +63,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/arbeidsplassencv-proxy/build.gradle b/proxies/arbeidsplassencv-proxy/build.gradle index 95411764bc1..00e16338c3e 100644 --- a/proxies/arbeidsplassencv-proxy/build.gradle +++ b/proxies/arbeidsplassencv-proxy/build.gradle @@ -70,4 +70,8 @@ dependencies { annotationProcessor 'org.projectlombok:lombok' testAnnotationProcessor 'org.projectlombok:lombok' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/arena-forvalteren-proxy/build.gradle b/proxies/arena-forvalteren-proxy/build.gradle index 37f6636be46..b3a8cc6581b 100644 --- a/proxies/arena-forvalteren-proxy/build.gradle +++ b/proxies/arena-forvalteren-proxy/build.gradle @@ -68,4 +68,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/batch-adeo-proxy/build.gradle b/proxies/batch-adeo-proxy/build.gradle index bef6c0826f1..e7e5aae2121 100644 --- a/proxies/batch-adeo-proxy/build.gradle +++ b/proxies/batch-adeo-proxy/build.gradle @@ -64,4 +64,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/brregstub-proxy/build.gradle b/proxies/brregstub-proxy/build.gradle index 072e7bfad92..0598d4830de 100644 --- a/proxies/brregstub-proxy/build.gradle +++ b/proxies/brregstub-proxy/build.gradle @@ -66,4 +66,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/dokarkiv-proxy/build.gradle b/proxies/dokarkiv-proxy/build.gradle index caca7a311b6..c07ab063e44 100644 --- a/proxies/dokarkiv-proxy/build.gradle +++ b/proxies/dokarkiv-proxy/build.gradle @@ -63,4 +63,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/ereg-proxy/build.gradle b/proxies/ereg-proxy/build.gradle index 7b12d93f4de..28906ba86c8 100644 --- a/proxies/ereg-proxy/build.gradle +++ b/proxies/ereg-proxy/build.gradle @@ -66,4 +66,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/histark-proxy/build.gradle b/proxies/histark-proxy/build.gradle index a335e091c44..0d572bcd0b4 100644 --- a/proxies/histark-proxy/build.gradle +++ b/proxies/histark-proxy/build.gradle @@ -66,4 +66,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/hodejegeren-proxy/build.gradle b/proxies/hodejegeren-proxy/build.gradle index 4b85d681446..8f1bd7a34e2 100644 --- a/proxies/hodejegeren-proxy/build.gradle +++ b/proxies/hodejegeren-proxy/build.gradle @@ -67,4 +67,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/inntektstub-proxy/build.gradle b/proxies/inntektstub-proxy/build.gradle index 430b61b4781..38ac8dd63c2 100644 --- a/proxies/inntektstub-proxy/build.gradle +++ b/proxies/inntektstub-proxy/build.gradle @@ -66,4 +66,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/inst-proxy/build.gradle b/proxies/inst-proxy/build.gradle index 9f450a1394a..f2cd37bb634 100644 --- a/proxies/inst-proxy/build.gradle +++ b/proxies/inst-proxy/build.gradle @@ -67,4 +67,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 \ No newline at end of file +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} \ No newline at end of file diff --git a/proxies/kodeverk-proxy/build.gradle b/proxies/kodeverk-proxy/build.gradle index b2722bc5129..56286d256ec 100644 --- a/proxies/kodeverk-proxy/build.gradle +++ b/proxies/kodeverk-proxy/build.gradle @@ -67,4 +67,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/kontoregister-person-proxy/build.gradle b/proxies/kontoregister-person-proxy/build.gradle index a188daab510..31c487116fd 100644 --- a/proxies/kontoregister-person-proxy/build.gradle +++ b/proxies/kontoregister-person-proxy/build.gradle @@ -68,4 +68,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/krrstub-proxy/build.gradle b/proxies/krrstub-proxy/build.gradle index 59e1660f7cd..618ab63d1a3 100644 --- a/proxies/krrstub-proxy/build.gradle +++ b/proxies/krrstub-proxy/build.gradle @@ -67,4 +67,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/medl-proxy/build.gradle b/proxies/medl-proxy/build.gradle index 12f000554ef..80c1ed634b4 100644 --- a/proxies/medl-proxy/build.gradle +++ b/proxies/medl-proxy/build.gradle @@ -67,4 +67,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/norg2-proxy/build.gradle b/proxies/norg2-proxy/build.gradle index 41eb8a4065a..bd72fe0563e 100644 --- a/proxies/norg2-proxy/build.gradle +++ b/proxies/norg2-proxy/build.gradle @@ -60,4 +60,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/pdl-proxy/build.gradle b/proxies/pdl-proxy/build.gradle index 3d6e0045cc0..072b239d698 100644 --- a/proxies/pdl-proxy/build.gradle +++ b/proxies/pdl-proxy/build.gradle @@ -68,4 +68,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/pensjon-testdata-facade-proxy/build.gradle b/proxies/pensjon-testdata-facade-proxy/build.gradle index 707b33381e8..3da7a5052fb 100644 --- a/proxies/pensjon-testdata-facade-proxy/build.gradle +++ b/proxies/pensjon-testdata-facade-proxy/build.gradle @@ -69,4 +69,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/saf-proxy/build.gradle b/proxies/saf-proxy/build.gradle index 5fa2e116a7c..adc5085c0e6 100644 --- a/proxies/saf-proxy/build.gradle +++ b/proxies/saf-proxy/build.gradle @@ -68,4 +68,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/sigrunstub-proxy/build.gradle b/proxies/sigrunstub-proxy/build.gradle index 3ad686bdb62..5a0c6a7eec9 100644 --- a/proxies/sigrunstub-proxy/build.gradle +++ b/proxies/sigrunstub-proxy/build.gradle @@ -65,4 +65,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/skjermingsregister-proxy/build.gradle b/proxies/skjermingsregister-proxy/build.gradle index 978b1d2ee6c..ebb7c1519af 100644 --- a/proxies/skjermingsregister-proxy/build.gradle +++ b/proxies/skjermingsregister-proxy/build.gradle @@ -69,4 +69,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/statisk-data-forvalter-proxy/build.gradle b/proxies/statisk-data-forvalter-proxy/build.gradle index a27c8b52552..5fa23c6dd42 100644 --- a/proxies/statisk-data-forvalter-proxy/build.gradle +++ b/proxies/statisk-data-forvalter-proxy/build.gradle @@ -69,4 +69,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/proxies/synthdata-meldekort-proxy/build.gradle b/proxies/synthdata-meldekort-proxy/build.gradle index 70ab5fc51ba..dd6a9b4fc83 100644 --- a/proxies/synthdata-meldekort-proxy/build.gradle +++ b/proxies/synthdata-meldekort-proxy/build.gradle @@ -73,4 +73,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 \ No newline at end of file +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} \ No newline at end of file diff --git a/proxies/tps-forvalteren-proxy/build.gradle b/proxies/tps-forvalteren-proxy/build.gradle index 655757df856..a3688ec7312 100644 --- a/proxies/tps-forvalteren-proxy/build.gradle +++ b/proxies/tps-forvalteren-proxy/build.gradle @@ -48,7 +48,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { diff --git a/proxies/udistub-proxy/build.gradle b/proxies/udistub-proxy/build.gradle index 103f162ec22..0f911e7a405 100644 --- a/proxies/udistub-proxy/build.gradle +++ b/proxies/udistub-proxy/build.gradle @@ -69,4 +69,8 @@ dependencies { testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} diff --git a/xsd/arbeidsforhold-xsd/build.gradle b/xsd/arbeidsforhold-xsd/build.gradle index 0cb08210f15..4329ba9891c 100644 --- a/xsd/arbeidsforhold-xsd/build.gradle +++ b/xsd/arbeidsforhold-xsd/build.gradle @@ -15,7 +15,11 @@ repositories { mavenLocal() } -java.sourceCompatibility = JavaVersion.VERSION_21 +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} dependencies { implementation 'jakarta.activation:jakarta.activation-api:2.1.2' From db0ce215eb65f6e756de380e3786d5f26140d803 Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 16 Oct 2023 16:05:49 +0200 Subject: [PATCH 06/18] * Migrert testnorge til Java 21, Spring 3.1.4 og Gradle 8.4 * En del refaktorering av deprecated funskjonalitet i dolly-backend #deploy-test-dolly-backend --- .github/workflows/build.yml | 2 +- .github/workflows/common.integration-test.yml | 2 +- .github/workflows/common.java-build.yml | 2 +- .github/workflows/common.scan.sonar.yml | 2 +- .github/workflows/common.workflow.frontend.yml | 2 +- .github/workflows/release.yml | 2 +- apps/adresse-service/Dockerfile | 2 +- apps/adresse-service/build.gradle | 4 ++-- apps/amelding-service/Dockerfile | 2 +- apps/amelding-service/build.gradle | 4 ++-- apps/app-tilgang-analyse-service/Dockerfile | 2 +- apps/app-tilgang-analyse-service/build.gradle | 4 ++-- apps/arbeidsforhold-export-api/Dockerfile | 2 +- apps/arbeidsforhold-export-api/build.gradle | 4 ++-- apps/arbeidsforhold-service/Dockerfile | 2 +- apps/arbeidsforhold-service/build.gradle | 4 ++-- apps/batch-bestilling-service/Dockerfile | 2 +- apps/batch-bestilling-service/build.gradle | 4 ++-- apps/brreg-stub/Dockerfile | 2 +- apps/brreg-stub/build.gradle | 2 +- apps/bruker-service/Dockerfile | 2 +- apps/bruker-service/build.gradle | 4 ++-- apps/dolly-backend/Dockerfile | 2 +- apps/dolly-backend/build.gradle | 4 ++-- .../no/nav/dolly/config/SecurityConfig.java | 17 +++++++---------- .../no/nav/dolly/domain/jpa/Bestilling.java | 9 ++++++--- .../java/no/nav/dolly/domain/jpa/Bruker.java | 3 ++- .../domain/jpa/OrganisasjonBestilling.java | 3 ++- .../no/nav/dolly/domain/jpa/Testgruppe.java | 6 ++++-- .../src/main/resources/application.yaml | 1 + apps/dolly-frontend/Dockerfile | 2 +- apps/dolly-frontend/build.gradle | 2 +- apps/dollystatus/Dockerfile | 2 +- apps/dollystatus/build.gradle | 2 +- apps/endringsmelding-frontend/Dockerfile | 2 +- apps/endringsmelding-frontend/build.gradle | 2 +- apps/endringsmelding-service/Dockerfile | 2 +- apps/endringsmelding-service/build.gradle | 4 ++-- apps/ereg-batch-status-service/Dockerfile | 2 +- apps/ereg-batch-status-service/build.gradle | 4 ++-- apps/faste-data-frontend/Dockerfile | 2 +- apps/faste-data-frontend/build.gradle | 2 +- .../Dockerfile | 2 +- .../build.gradle | 4 ++-- apps/generer-navn-service/Dockerfile | 2 +- apps/generer-navn-service/build.gradle | 4 ++-- .../Dockerfile | 2 +- .../build.gradle | 4 ++-- apps/generer-synt-amelding-service/Dockerfile | 2 +- apps/generer-synt-amelding-service/build.gradle | 4 ++-- apps/geografiske-kodeverk-service/Dockerfile | 2 +- apps/geografiske-kodeverk-service/build.gradle | 4 ++-- apps/helsepersonell-service/Dockerfile | 2 +- apps/helsepersonell-service/build.gradle | 4 ++-- apps/hodejegeren/Dockerfile | 2 +- apps/hodejegeren/build.gradle | 4 ++-- apps/import-person-service/Dockerfile | 2 +- apps/import-person-service/build.gradle | 4 ++-- .../Dockerfile | 2 +- .../build.gradle | 4 ++-- apps/inntektsmelding-service/Dockerfile | 2 +- apps/inntektsmelding-service/build.gradle | 4 ++-- apps/jenkins-batch-status-service/Dockerfile | 2 +- apps/jenkins-batch-status-service/build.gradle | 4 ++-- apps/joark-dokument-service/Dockerfile | 2 +- apps/joark-dokument-service/build.gradle | 4 ++-- apps/miljoer-service/Dockerfile | 2 +- apps/miljoer-service/build.gradle | 4 ++-- apps/mn-synt-arbeidsforhold-service/Dockerfile | 2 +- .../mn-synt-arbeidsforhold-service/build.gradle | 4 ++-- apps/oppsummeringsdokument-service/Dockerfile | 2 +- apps/oppsummeringsdokument-service/build.gradle | 4 ++-- apps/organisasjon-bestilling-service/Dockerfile | 2 +- .../build.gradle | 4 ++-- apps/organisasjon-faste-data-service/Dockerfile | 2 +- .../build.gradle | 4 ++-- apps/organisasjon-forvalter/Dockerfile | 2 +- apps/organisasjon-forvalter/build.gradle | 2 +- apps/organisasjon-mottak-service/Dockerfile | 2 +- apps/organisasjon-mottak-service/build.gradle | 2 +- apps/organisasjon-service/Dockerfile | 2 +- apps/organisasjon-service/build.gradle | 2 +- apps/organisasjon-tilgang-frontend/Dockerfile | 2 +- apps/organisasjon-tilgang-frontend/build.gradle | 2 +- apps/organisasjon-tilgang-service/Dockerfile | 2 +- apps/organisasjon-tilgang-service/build.gradle | 4 ++-- apps/orgnummer-service/Dockerfile | 2 +- apps/orgnummer-service/build.gradle | 4 ++-- apps/oversikt-frontend/Dockerfile | 2 +- apps/oversikt-frontend/build.gradle | 2 +- apps/pdl-forvalter/Dockerfile | 2 +- apps/pdl-forvalter/build.gradle | 4 ++-- apps/person-export-api/Dockerfile | 2 +- apps/person-export-api/build.gradle | 4 ++-- apps/person-faste-data-service/Dockerfile | 2 +- apps/person-faste-data-service/build.gradle | 4 ++-- .../Dockerfile | 2 +- .../build.gradle | 2 +- apps/person-search-service/Dockerfile | 2 +- apps/person-search-service/build.gradle | 2 +- apps/person-service/Dockerfile | 2 +- apps/person-service/build.gradle | 2 +- apps/profil-api/Dockerfile | 2 +- apps/profil-api/build.gradle | 2 +- apps/sykemelding-api/Dockerfile | 2 +- apps/sykemelding-api/build.gradle | 4 ++-- apps/synt-sykemelding-api/Dockerfile | 2 +- apps/synt-sykemelding-api/build.gradle | 2 +- apps/synt-vedtakshistorikk-service/Dockerfile | 2 +- apps/synt-vedtakshistorikk-service/build.gradle | 2 +- apps/testnav-ident-pool/Dockerfile | 2 +- apps/testnav-ident-pool/build.gradle | 2 +- apps/testnorge-bisys/Dockerfile | 2 +- apps/testnorge-bisys/build.gradle | 2 +- .../testnorge-statisk-data-forvalter/Dockerfile | 2 +- .../build.gradle | 4 ++-- apps/testnorge-tp/Dockerfile | 2 +- apps/testnorge-tp/build.gradle | 2 +- apps/tilbakemelding-api/Dockerfile | 2 +- apps/tilbakemelding-api/build.gradle | 2 +- apps/tps-messaging-service/Dockerfile | 2 +- apps/tps-messaging-service/build.gradle | 2 +- apps/udi-stub/Dockerfile | 2 +- apps/udi-stub/build.gradle | 2 +- apps/varslinger-service/Dockerfile | 2 +- apps/varslinger-service/build.gradle | 2 +- examples/reactive-rest-example/build.gradle | 2 +- libs/commands/build.gradle | 4 ++-- libs/csv-converter/build.gradle | 4 ++-- libs/data-transfer-objects/build.gradle | 6 +++--- libs/database/build.gradle | 4 ++-- libs/domain/build.gradle | 4 ++-- libs/integration-test/build.gradle | 4 ++-- libs/kafka-config/build.gradle | 4 ++-- libs/kafka-producers/build.gradle | 4 ++-- libs/reactive-core/build.gradle | 4 ++-- libs/reactive-frontend/build.gradle | 4 ++-- libs/reactive-proxy/build.gradle | 4 ++-- libs/reactive-security/build.gradle | 4 ++-- libs/reactive-session-security/build.gradle | 4 ++-- libs/security-core/build.gradle | 4 ++-- libs/security-token-service/build.gradle | 4 ++-- libs/servlet-core/build.gradle | 6 +++--- libs/servlet-insecure-security/build.gradle | 4 ++-- libs/servlet-security/build.gradle | 4 ++-- libs/slack/build.gradle | 4 ++-- libs/testing/build.gradle | 4 ++-- mocks/maskinporten-mock/Dockerfile | 2 +- mocks/maskinporten-mock/build.gradle | 2 +- mocks/tokendings-mock/Dockerfile | 2 +- mocks/tokendings-mock/build.gradle | 2 +- proxies/aareg-proxy/Dockerfile | 2 +- proxies/aareg-proxy/build.gradle | 2 +- proxies/aareg-synt-services-proxy/Dockerfile | 2 +- proxies/aareg-synt-services-proxy/build.gradle | 2 +- proxies/arbeidsplassencv-proxy/Dockerfile | 2 +- proxies/arbeidsplassencv-proxy/build.gradle | 2 +- proxies/arena-forvalteren-proxy/Dockerfile | 2 +- proxies/arena-forvalteren-proxy/build.gradle | 2 +- proxies/batch-adeo-proxy/Dockerfile | 2 +- proxies/batch-adeo-proxy/build.gradle | 2 +- proxies/brregstub-proxy/Dockerfile | 2 +- proxies/brregstub-proxy/build.gradle | 2 +- proxies/dokarkiv-proxy/Dockerfile | 2 +- proxies/ereg-proxy/Dockerfile | 2 +- proxies/ereg-proxy/build.gradle | 2 +- proxies/histark-proxy/Dockerfile | 2 +- proxies/histark-proxy/build.gradle | 2 +- proxies/hodejegeren-proxy/Dockerfile | 2 +- proxies/hodejegeren-proxy/build.gradle | 2 +- proxies/inntektstub-proxy/Dockerfile | 2 +- proxies/inntektstub-proxy/build.gradle | 2 +- proxies/inst-proxy/Dockerfile | 2 +- proxies/inst-proxy/build.gradle | 2 +- proxies/kodeverk-proxy/Dockerfile | 2 +- proxies/kodeverk-proxy/build.gradle | 2 +- proxies/kontoregister-person-proxy/Dockerfile | 2 +- proxies/kontoregister-person-proxy/build.gradle | 2 +- proxies/krrstub-proxy/Dockerfile | 2 +- proxies/krrstub-proxy/build.gradle | 2 +- proxies/medl-proxy/Dockerfile | 2 +- proxies/medl-proxy/build.gradle | 2 +- proxies/norg2-proxy/Dockerfile | 2 +- proxies/norg2-proxy/build.gradle | 2 +- proxies/pdl-proxy/Dockerfile | 2 +- proxies/pdl-proxy/build.gradle | 2 +- .../pensjon-testdata-facade-proxy/Dockerfile | 2 +- .../pensjon-testdata-facade-proxy/build.gradle | 2 +- proxies/saf-proxy/Dockerfile | 2 +- proxies/saf-proxy/build.gradle | 2 +- proxies/sigrunstub-proxy/Dockerfile | 2 +- proxies/sigrunstub-proxy/build.gradle | 2 +- proxies/skjermingsregister-proxy/Dockerfile | 2 +- proxies/skjermingsregister-proxy/build.gradle | 2 +- proxies/statisk-data-forvalter-proxy/Dockerfile | 2 +- .../statisk-data-forvalter-proxy/build.gradle | 2 +- proxies/synthdata-meldekort-proxy/Dockerfile | 2 +- proxies/synthdata-meldekort-proxy/build.gradle | 2 +- proxies/tps-forvalteren-proxy/Dockerfile | 2 +- proxies/tps-forvalteren-proxy/build.gradle | 2 +- proxies/udistub-proxy/Dockerfile | 2 +- proxies/udistub-proxy/build.gradle | 2 +- 202 files changed, 274 insertions(+), 269 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index d5e80555011..d74c6f544af 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: 17 + java-version: 21 - name: "Gradle" env: NAV_TOKEN: ${{ secrets.NAV_TOKEN }} diff --git a/.github/workflows/common.integration-test.yml b/.github/workflows/common.integration-test.yml index ec10cc59de4..24fecafed3b 100644 --- a/.github/workflows/common.integration-test.yml +++ b/.github/workflows/common.integration-test.yml @@ -23,7 +23,7 @@ jobs: - name: "Java" uses: actions/setup-java@v3 with: - java-version: '17' + java-version: 21 distribution: 'temurin' - name: "Gradle" env: diff --git a/.github/workflows/common.java-build.yml b/.github/workflows/common.java-build.yml index cd81d7499bb..4e55631a90c 100644 --- a/.github/workflows/common.java-build.yml +++ b/.github/workflows/common.java-build.yml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '17.x' + java-version: 21 - name: "Gradle" env: GITHUB_USERNAME: token diff --git a/.github/workflows/common.scan.sonar.yml b/.github/workflows/common.scan.sonar.yml index 6c9fd216d77..8730135526a 100644 --- a/.github/workflows/common.scan.sonar.yml +++ b/.github/workflows/common.scan.sonar.yml @@ -23,7 +23,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: temurin - java-version: 17 + java-version: 21 - name: "Gradle" env: NAV_TOKEN: ${{ secrets.NAV_TOKEN }} diff --git a/.github/workflows/common.workflow.frontend.yml b/.github/workflows/common.workflow.frontend.yml index fd7de942ffb..0c21d3e1ea1 100644 --- a/.github/workflows/common.workflow.frontend.yml +++ b/.github/workflows/common.workflow.frontend.yml @@ -129,7 +129,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '17.x' + java-version: 21 - name: "Gradle" env: GITHUB_USERNAME: token diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e7f9292bcc6..772d345a134 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: 'temurin' - java-version: '17' + java-version: 21 - name: "Setup" env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/apps/adresse-service/Dockerfile b/apps/adresse-service/Dockerfile index 6d9f495a63e..2e4b46593a7 100644 --- a/apps/adresse-service/Dockerfile +++ b/apps/adresse-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED" diff --git a/apps/adresse-service/build.gradle b/apps/adresse-service/build.gradle index 3a1a3b7386a..b711d124cfd 100644 --- a/apps/adresse-service/build.gradle +++ b/apps/adresse-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -69,7 +69,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/amelding-service/Dockerfile b/apps/amelding-service/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/apps/amelding-service/Dockerfile +++ b/apps/amelding-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/amelding-service/build.gradle b/apps/amelding-service/build.gradle index f2f1c166a23..4da0b508de2 100644 --- a/apps/amelding-service/build.gradle +++ b/apps/amelding-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -72,7 +72,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/app-tilgang-analyse-service/Dockerfile b/apps/app-tilgang-analyse-service/Dockerfile index 9953272c099..8a7b7194ee7 100644 --- a/apps/app-tilgang-analyse-service/Dockerfile +++ b/apps/app-tilgang-analyse-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/app-tilgang-analyse-service/build.gradle b/apps/app-tilgang-analyse-service/build.gradle index 33a1f4997cc..32a1365b483 100644 --- a/apps/app-tilgang-analyse-service/build.gradle +++ b/apps/app-tilgang-analyse-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -70,7 +70,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/arbeidsforhold-export-api/Dockerfile b/apps/arbeidsforhold-export-api/Dockerfile index e4cd80b6c33..68d3c407ce4 100644 --- a/apps/arbeidsforhold-export-api/Dockerfile +++ b/apps/arbeidsforhold-export-api/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod -Xmx2g -Xms1g" diff --git a/apps/arbeidsforhold-export-api/build.gradle b/apps/arbeidsforhold-export-api/build.gradle index 9ea20dbcbb4..381391e0b7b 100644 --- a/apps/arbeidsforhold-export-api/build.gradle +++ b/apps/arbeidsforhold-export-api/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.0.6" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -71,7 +71,7 @@ dependencies { implementation 'org.apache.commons:commons-csv:1.10.0' implementation 'jakarta.annotation:jakarta.annotation-api:2.1.1' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/arbeidsforhold-service/Dockerfile b/apps/arbeidsforhold-service/Dockerfile index 022f2af0f15..65bd1527b96 100644 --- a/apps/arbeidsforhold-service/Dockerfile +++ b/apps/arbeidsforhold-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/arbeidsforhold-service/build.gradle b/apps/arbeidsforhold-service/build.gradle index e1d77f5772b..fbb3e84018d 100644 --- a/apps/arbeidsforhold-service/build.gradle +++ b/apps/arbeidsforhold-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -81,7 +81,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'javax.annotation:javax.annotation-api:1.3.2' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' diff --git a/apps/batch-bestilling-service/Dockerfile b/apps/batch-bestilling-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/batch-bestilling-service/Dockerfile +++ b/apps/batch-bestilling-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/batch-bestilling-service/build.gradle b/apps/batch-bestilling-service/build.gradle index 1b618df8908..ddc43abc54e 100644 --- a/apps/batch-bestilling-service/build.gradle +++ b/apps/batch-bestilling-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -68,7 +68,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/brreg-stub/Dockerfile b/apps/brreg-stub/Dockerfile index f0da42a7b17..ed79ebacbc5 100644 --- a/apps/brreg-stub/Dockerfile +++ b/apps/brreg-stub/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index 4d31579de58..b1447c77f1d 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -4,7 +4,7 @@ plugins { id "uk.co.boothen.gradle.wsimport" version "0.17" id 'com.ewerk.gradle.plugins.jaxb2' version '1.0.10' id 'org.springframework.boot' version "2.7.5" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/bruker-service/Dockerfile b/apps/bruker-service/Dockerfile index 5d930db245b..11043b561a5 100644 --- a/apps/bruker-service/Dockerfile +++ b/apps/bruker-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD build/libs/app.jar /app/app.jar diff --git a/apps/bruker-service/build.gradle b/apps/bruker-service/build.gradle index 2c9827f9ec0..de2feea74b3 100644 --- a/apps/bruker-service/build.gradle +++ b/apps/bruker-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -76,7 +76,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/dolly-backend/Dockerfile b/apps/dolly-backend/Dockerfile index 13378133a7b..426ca58b68f 100644 --- a/apps/dolly-backend/Dockerfile +++ b/apps/dolly-backend/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Registere" ADD build/libs/app.jar /app/app.jar diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index acbcf96cec7..7caf1adf626 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -80,7 +80,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-webflux' diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/config/SecurityConfig.java b/apps/dolly-backend/src/main/java/no/nav/dolly/config/SecurityConfig.java index 62fff925986..f42fc58ce07 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/config/SecurityConfig.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/config/SecurityConfig.java @@ -4,6 +4,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; +import org.springframework.security.config.annotation.web.configurers.AbstractHttpConfigurer; import org.springframework.security.config.http.SessionCreationPolicy; import org.springframework.security.web.SecurityFilterChain; @@ -14,11 +15,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(AbstractHttpConfigurer::disable) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -27,11 +26,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bestilling.java index 044def7f833..39809a52472 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bestilling.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bestilling.java @@ -97,15 +97,18 @@ public class Bestilling implements Serializable { @Column(name = "NAV_SYNTETISK_IDENT") private Boolean navSyntetiskIdent; - @OneToMany(mappedBy = "bestilling", fetch = FetchType.LAZY) + @OneToMany(fetch = FetchType.LAZY) + @JoinColumn(name = "bestilling_id") @Builder.Default private List progresser = new ArrayList<>(); - @OneToMany(mappedBy = "bestillingId", fetch = FetchType.LAZY) + @OneToMany(fetch = FetchType.LAZY) + @JoinColumn(name = "bestilling_id") @Builder.Default private List kontroller = new ArrayList<>(); - @OneToMany(mappedBy = "bestillingId", fetch = FetchType.LAZY) + @OneToMany(fetch = FetchType.LAZY) + @JoinColumn(name = "bestilling_id") @Builder.Default private List transaksjonmapping = new ArrayList<>(); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bruker.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bruker.java index 1bce1cee3d4..3b07d184c96 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bruker.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Bruker.java @@ -74,7 +74,8 @@ public class Bruker implements Serializable { @JoinColumn(name = "EID_AV_ID") private Bruker eidAv; - @OneToMany(mappedBy = "opprettetAv") + @OneToMany + @JoinColumn(name = "opprettet_av") @Builder.Default private Set testgrupper = new HashSet<>(); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/OrganisasjonBestilling.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/OrganisasjonBestilling.java index 9f622afcae8..248b0715158 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/OrganisasjonBestilling.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/OrganisasjonBestilling.java @@ -70,7 +70,8 @@ public class OrganisasjonBestilling { @JoinColumn(name = "bruker_id", nullable = false) private Bruker bruker; - @OneToMany(mappedBy = "bestilling", fetch = FetchType.LAZY) + @OneToMany(fetch = FetchType.LAZY) + @JoinColumn(name = "bestilling_id") @Builder.Default private List progresser = new ArrayList<>(); diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Testgruppe.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Testgruppe.java index eedc21754e0..68bf6dac3e9 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Testgruppe.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/Testgruppe.java @@ -73,7 +73,8 @@ public class Testgruppe implements Serializable { @Column(name = "DATO_ENDRET", nullable = false) private LocalDate datoEndret; - @OneToMany(mappedBy = "testgruppe", fetch = FetchType.EAGER) + @OneToMany(fetch = FetchType.EAGER) + @JoinColumn(name = "tilhoerer_gruppe") @Column(unique = true) @Builder.Default @OrderBy("id DESC") @@ -84,7 +85,8 @@ public class Testgruppe implements Serializable { private Set favorisertAv = new HashSet<>(); @OrderBy("id") - @OneToMany(mappedBy = "gruppe", fetch = FetchType.LAZY) + @OneToMany(fetch = FetchType.LAZY) + @JoinColumn(name = "gruppe_id") @Builder.Default private Set bestillinger = new HashSet<>(); diff --git a/apps/dolly-backend/src/main/resources/application.yaml b/apps/dolly-backend/src/main/resources/application.yaml index 7dc9013a424..5c1befbeb07 100644 --- a/apps/dolly-backend/src/main/resources/application.yaml +++ b/apps/dolly-backend/src/main/resources/application.yaml @@ -56,6 +56,7 @@ springdoc: url: /v3/api-docs disable-swagger-default-url: true tags-sorter: alpha + pre-loading-enabled: true management: endpoints: diff --git a/apps/dolly-frontend/Dockerfile b/apps/dolly-frontend/Dockerfile index 09c144763eb..3f002237479 100644 --- a/apps/dolly-frontend/Dockerfile +++ b/apps/dolly-frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" COPY build/libs/*.jar /app/ \ No newline at end of file diff --git a/apps/dolly-frontend/build.gradle b/apps/dolly-frontend/build.gradle index 72056d7b835..5820d0d7e43 100644 --- a/apps/dolly-frontend/build.gradle +++ b/apps/dolly-frontend/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java' id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/dollystatus/Dockerfile b/apps/dollystatus/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/dollystatus/Dockerfile +++ b/apps/dollystatus/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/dollystatus/build.gradle b/apps/dollystatus/build.gradle index 0c76b005c74..61084c8e424 100644 --- a/apps/dollystatus/build.gradle +++ b/apps/dollystatus/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/endringsmelding-frontend/Dockerfile b/apps/endringsmelding-frontend/Dockerfile index d0bf3a382a9..bdb2684b81c 100644 --- a/apps/endringsmelding-frontend/Dockerfile +++ b/apps/endringsmelding-frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/endringsmelding-frontend/build.gradle b/apps/endringsmelding-frontend/build.gradle index c4f97696e98..0bc6991138d 100644 --- a/apps/endringsmelding-frontend/build.gradle +++ b/apps/endringsmelding-frontend/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/endringsmelding-service/Dockerfile b/apps/endringsmelding-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/endringsmelding-service/Dockerfile +++ b/apps/endringsmelding-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/endringsmelding-service/build.gradle b/apps/endringsmelding-service/build.gradle index d9fe942d72b..7b2899c0aef 100644 --- a/apps/endringsmelding-service/build.gradle +++ b/apps/endringsmelding-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -58,7 +58,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/ereg-batch-status-service/Dockerfile b/apps/ereg-batch-status-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/ereg-batch-status-service/Dockerfile +++ b/apps/ereg-batch-status-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index 55756d8f27d..8590860764b 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -66,7 +66,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/faste-data-frontend/Dockerfile b/apps/faste-data-frontend/Dockerfile index d0bf3a382a9..bdb2684b81c 100644 --- a/apps/faste-data-frontend/Dockerfile +++ b/apps/faste-data-frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/faste-data-frontend/build.gradle b/apps/faste-data-frontend/build.gradle index bff21a7443b..3d9bc024077 100644 --- a/apps/faste-data-frontend/build.gradle +++ b/apps/faste-data-frontend/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/generer-arbeidsforhold-populasjon-service/Dockerfile b/apps/generer-arbeidsforhold-populasjon-service/Dockerfile index ee86e82a16b..99258cd954d 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/Dockerfile +++ b/apps/generer-arbeidsforhold-populasjon-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/generer-arbeidsforhold-populasjon-service/build.gradle b/apps/generer-arbeidsforhold-populasjon-service/build.gradle index f87fc00d929..6f863e3fbef 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/build.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -67,7 +67,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/generer-navn-service/Dockerfile b/apps/generer-navn-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/generer-navn-service/Dockerfile +++ b/apps/generer-navn-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/generer-navn-service/build.gradle b/apps/generer-navn-service/build.gradle index 044be5d8123..f6122f5aa5e 100644 --- a/apps/generer-navn-service/build.gradle +++ b/apps/generer-navn-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -64,7 +64,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/generer-organisasjon-populasjon-service/Dockerfile b/apps/generer-organisasjon-populasjon-service/Dockerfile index ee86e82a16b..99258cd954d 100644 --- a/apps/generer-organisasjon-populasjon-service/Dockerfile +++ b/apps/generer-organisasjon-populasjon-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/generer-organisasjon-populasjon-service/build.gradle b/apps/generer-organisasjon-populasjon-service/build.gradle index 1dba0143625..8cecb8ef4cb 100644 --- a/apps/generer-organisasjon-populasjon-service/build.gradle +++ b/apps/generer-organisasjon-populasjon-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -85,7 +85,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.postgresql:postgresql' diff --git a/apps/generer-synt-amelding-service/Dockerfile b/apps/generer-synt-amelding-service/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/apps/generer-synt-amelding-service/Dockerfile +++ b/apps/generer-synt-amelding-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/generer-synt-amelding-service/build.gradle b/apps/generer-synt-amelding-service/build.gradle index b16667276e3..8e76291ecc3 100644 --- a/apps/generer-synt-amelding-service/build.gradle +++ b/apps/generer-synt-amelding-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -60,7 +60,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/geografiske-kodeverk-service/Dockerfile b/apps/geografiske-kodeverk-service/Dockerfile index 9953272c099..8a7b7194ee7 100644 --- a/apps/geografiske-kodeverk-service/Dockerfile +++ b/apps/geografiske-kodeverk-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/geografiske-kodeverk-service/build.gradle b/apps/geografiske-kodeverk-service/build.gradle index 049451fc75d..af34e276b99 100644 --- a/apps/geografiske-kodeverk-service/build.gradle +++ b/apps/geografiske-kodeverk-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -65,7 +65,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/helsepersonell-service/Dockerfile b/apps/helsepersonell-service/Dockerfile index ee86e82a16b..99258cd954d 100644 --- a/apps/helsepersonell-service/Dockerfile +++ b/apps/helsepersonell-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/helsepersonell-service/build.gradle b/apps/helsepersonell-service/build.gradle index e46e3bf0398..1748a0a3505 100644 --- a/apps/helsepersonell-service/build.gradle +++ b/apps/helsepersonell-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -64,7 +64,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/hodejegeren/Dockerfile b/apps/hodejegeren/Dockerfile index d0bf3a382a9..bdb2684b81c 100644 --- a/apps/hodejegeren/Dockerfile +++ b/apps/hodejegeren/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/hodejegeren/build.gradle b/apps/hodejegeren/build.gradle index 6ee476953bb..1ea4d4326da 100644 --- a/apps/hodejegeren/build.gradle +++ b/apps/hodejegeren/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -74,7 +74,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'no.nav.registre:testnorge-consumers:1.12.0-RELEASE' diff --git a/apps/import-person-service/Dockerfile b/apps/import-person-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/import-person-service/Dockerfile +++ b/apps/import-person-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/import-person-service/build.gradle b/apps/import-person-service/build.gradle index 8b1715c7234..c4f59902358 100644 --- a/apps/import-person-service/build.gradle +++ b/apps/import-person-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -72,7 +72,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/inntektsmelding-generator-service/Dockerfile b/apps/inntektsmelding-generator-service/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/apps/inntektsmelding-generator-service/Dockerfile +++ b/apps/inntektsmelding-generator-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/inntektsmelding-generator-service/build.gradle b/apps/inntektsmelding-generator-service/build.gradle index e2c04ec0dfa..8181b0d1e82 100644 --- a/apps/inntektsmelding-generator-service/build.gradle +++ b/apps/inntektsmelding-generator-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -60,7 +60,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.aspectj:aspectjweaver:1.9.7' diff --git a/apps/inntektsmelding-service/Dockerfile b/apps/inntektsmelding-service/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/apps/inntektsmelding-service/Dockerfile +++ b/apps/inntektsmelding-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/inntektsmelding-service/build.gradle b/apps/inntektsmelding-service/build.gradle index 1d0881a6ec4..b655fadd6fd 100644 --- a/apps/inntektsmelding-service/build.gradle +++ b/apps/inntektsmelding-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -65,7 +65,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.aspectj:aspectjweaver:1.9.7' diff --git a/apps/jenkins-batch-status-service/Dockerfile b/apps/jenkins-batch-status-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/jenkins-batch-status-service/Dockerfile +++ b/apps/jenkins-batch-status-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/jenkins-batch-status-service/build.gradle b/apps/jenkins-batch-status-service/build.gradle index 0c276944048..22465348e91 100644 --- a/apps/jenkins-batch-status-service/build.gradle +++ b/apps/jenkins-batch-status-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -68,7 +68,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/joark-dokument-service/Dockerfile b/apps/joark-dokument-service/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/apps/joark-dokument-service/Dockerfile +++ b/apps/joark-dokument-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/joark-dokument-service/build.gradle b/apps/joark-dokument-service/build.gradle index 466103458cd..d3ac51d11bb 100644 --- a/apps/joark-dokument-service/build.gradle +++ b/apps/joark-dokument-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -65,7 +65,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/miljoer-service/Dockerfile b/apps/miljoer-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/miljoer-service/Dockerfile +++ b/apps/miljoer-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/miljoer-service/build.gradle b/apps/miljoer-service/build.gradle index 0ad7b1d37a3..dcb4c77bbe5 100644 --- a/apps/miljoer-service/build.gradle +++ b/apps/miljoer-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -66,7 +66,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/mn-synt-arbeidsforhold-service/Dockerfile b/apps/mn-synt-arbeidsforhold-service/Dockerfile index 0ec5db5d55f..f07acf30380 100644 --- a/apps/mn-synt-arbeidsforhold-service/Dockerfile +++ b/apps/mn-synt-arbeidsforhold-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/mn-synt-arbeidsforhold-service/build.gradle b/apps/mn-synt-arbeidsforhold-service/build.gradle index 3674c30256e..d236347a58a 100644 --- a/apps/mn-synt-arbeidsforhold-service/build.gradle +++ b/apps/mn-synt-arbeidsforhold-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -77,7 +77,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/oppsummeringsdokument-service/Dockerfile b/apps/oppsummeringsdokument-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/oppsummeringsdokument-service/Dockerfile +++ b/apps/oppsummeringsdokument-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index 77c5ea512f2..c92f246ba62 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.0.6" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -94,7 +94,7 @@ dependencies { implementation 'io.confluent:kafka-avro-serializer:7.3.2' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.hibernate.validator:hibernate-validator' implementation 'no.nav.freg:freg-security-oidc:2c24d35d' diff --git a/apps/organisasjon-bestilling-service/Dockerfile b/apps/organisasjon-bestilling-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/organisasjon-bestilling-service/Dockerfile +++ b/apps/organisasjon-bestilling-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/organisasjon-bestilling-service/build.gradle b/apps/organisasjon-bestilling-service/build.gradle index 4ba56ef5698..24bbdd8cc28 100644 --- a/apps/organisasjon-bestilling-service/build.gradle +++ b/apps/organisasjon-bestilling-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -76,7 +76,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/organisasjon-faste-data-service/Dockerfile b/apps/organisasjon-faste-data-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/organisasjon-faste-data-service/Dockerfile +++ b/apps/organisasjon-faste-data-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/organisasjon-faste-data-service/build.gradle b/apps/organisasjon-faste-data-service/build.gradle index 8d074328abf..062adce1e16 100644 --- a/apps/organisasjon-faste-data-service/build.gradle +++ b/apps/organisasjon-faste-data-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -84,7 +84,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/organisasjon-forvalter/Dockerfile b/apps/organisasjon-forvalter/Dockerfile index 5ff980a2155..c564b3282a9 100644 --- a/apps/organisasjon-forvalter/Dockerfile +++ b/apps/organisasjon-forvalter/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED" diff --git a/apps/organisasjon-forvalter/build.gradle b/apps/organisasjon-forvalter/build.gradle index f7f5a36ea7b..f1628c68107 100644 --- a/apps/organisasjon-forvalter/build.gradle +++ b/apps/organisasjon-forvalter/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/organisasjon-mottak-service/Dockerfile b/apps/organisasjon-mottak-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/organisasjon-mottak-service/Dockerfile +++ b/apps/organisasjon-mottak-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/organisasjon-mottak-service/build.gradle b/apps/organisasjon-mottak-service/build.gradle index 2773e2f1a4f..4fa3d9c884e 100644 --- a/apps/organisasjon-mottak-service/build.gradle +++ b/apps/organisasjon-mottak-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/organisasjon-service/Dockerfile b/apps/organisasjon-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/organisasjon-service/Dockerfile +++ b/apps/organisasjon-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/organisasjon-service/build.gradle b/apps/organisasjon-service/build.gradle index 30902fb0c26..c8c81b3596b 100644 --- a/apps/organisasjon-service/build.gradle +++ b/apps/organisasjon-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/organisasjon-tilgang-frontend/Dockerfile b/apps/organisasjon-tilgang-frontend/Dockerfile index 236fb16555d..fc1dcd83426 100644 --- a/apps/organisasjon-tilgang-frontend/Dockerfile +++ b/apps/organisasjon-tilgang-frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/organisasjon-tilgang-frontend/build.gradle b/apps/organisasjon-tilgang-frontend/build.gradle index a2c5dcabf6d..54b9e666c8b 100644 --- a/apps/organisasjon-tilgang-frontend/build.gradle +++ b/apps/organisasjon-tilgang-frontend/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/organisasjon-tilgang-service/Dockerfile b/apps/organisasjon-tilgang-service/Dockerfile index 65efcfe23d5..5adc5c61063 100644 --- a/apps/organisasjon-tilgang-service/Dockerfile +++ b/apps/organisasjon-tilgang-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD build/libs/app.jar /app/app.jar diff --git a/apps/organisasjon-tilgang-service/build.gradle b/apps/organisasjon-tilgang-service/build.gradle index 9581fd68608..ab0cd9eeded 100644 --- a/apps/organisasjon-tilgang-service/build.gradle +++ b/apps/organisasjon-tilgang-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -73,7 +73,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/orgnummer-service/Dockerfile b/apps/orgnummer-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/orgnummer-service/Dockerfile +++ b/apps/orgnummer-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/orgnummer-service/build.gradle b/apps/orgnummer-service/build.gradle index d9f8dbfefa0..67d77214efe 100644 --- a/apps/orgnummer-service/build.gradle +++ b/apps/orgnummer-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -77,7 +77,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.postgresql:postgresql' diff --git a/apps/oversikt-frontend/Dockerfile b/apps/oversikt-frontend/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/oversikt-frontend/Dockerfile +++ b/apps/oversikt-frontend/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/oversikt-frontend/build.gradle b/apps/oversikt-frontend/build.gradle index a4867c3d22f..b49a0984f75 100644 --- a/apps/oversikt-frontend/build.gradle +++ b/apps/oversikt-frontend/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/pdl-forvalter/Dockerfile b/apps/pdl-forvalter/Dockerfile index 87b31b94946..65670162b5e 100644 --- a/apps/pdl-forvalter/Dockerfile +++ b/apps/pdl-forvalter/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" COPY build/libs/app.jar /app/app.jar diff --git a/apps/pdl-forvalter/build.gradle b/apps/pdl-forvalter/build.gradle index ce36c5f2d3e..d12385c6442 100644 --- a/apps/pdl-forvalter/build.gradle +++ b/apps/pdl-forvalter/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -84,7 +84,7 @@ dependencies { implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.postgresql:postgresql' implementation 'org.flywaydb:flyway-core' diff --git a/apps/person-export-api/Dockerfile b/apps/person-export-api/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/person-export-api/Dockerfile +++ b/apps/person-export-api/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/person-export-api/build.gradle b/apps/person-export-api/build.gradle index 70a2e5cce04..7deb451efd3 100644 --- a/apps/person-export-api/build.gradle +++ b/apps/person-export-api/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -70,7 +70,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/person-faste-data-service/Dockerfile b/apps/person-faste-data-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/person-faste-data-service/Dockerfile +++ b/apps/person-faste-data-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/person-faste-data-service/build.gradle b/apps/person-faste-data-service/build.gradle index 56edd87eb81..3236c073810 100644 --- a/apps/person-faste-data-service/build.gradle +++ b/apps/person-faste-data-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -71,7 +71,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/person-organisasjon-tilgang-service/Dockerfile b/apps/person-organisasjon-tilgang-service/Dockerfile index 5d930db245b..11043b561a5 100644 --- a/apps/person-organisasjon-tilgang-service/Dockerfile +++ b/apps/person-organisasjon-tilgang-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD build/libs/app.jar /app/app.jar diff --git a/apps/person-organisasjon-tilgang-service/build.gradle b/apps/person-organisasjon-tilgang-service/build.gradle index cc7194355b6..79b413367dc 100644 --- a/apps/person-organisasjon-tilgang-service/build.gradle +++ b/apps/person-organisasjon-tilgang-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/person-search-service/Dockerfile b/apps/person-search-service/Dockerfile index 81a9ac4ca23..b43d2c69103 100644 --- a/apps/person-search-service/Dockerfile +++ b/apps/person-search-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="--add-opens java.base/java.lang=ALL-UNNAMED -Dspring.profiles.active=prod" diff --git a/apps/person-search-service/build.gradle b/apps/person-search-service/build.gradle index 3c3f6225fab..28d5453c90b 100644 --- a/apps/person-search-service/build.gradle +++ b/apps/person-search-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/person-service/Dockerfile b/apps/person-service/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/apps/person-service/Dockerfile +++ b/apps/person-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/person-service/build.gradle b/apps/person-service/build.gradle index c1b8970cddb..68a1610e589 100644 --- a/apps/person-service/build.gradle +++ b/apps/person-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/profil-api/Dockerfile b/apps/profil-api/Dockerfile index ee86e82a16b..99258cd954d 100644 --- a/apps/profil-api/Dockerfile +++ b/apps/profil-api/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/profil-api/build.gradle b/apps/profil-api/build.gradle index 1d82b4c3d4a..6eeaccbe6b3 100644 --- a/apps/profil-api/build.gradle +++ b/apps/profil-api/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/sykemelding-api/Dockerfile b/apps/sykemelding-api/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/sykemelding-api/Dockerfile +++ b/apps/sykemelding-api/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/sykemelding-api/build.gradle b/apps/sykemelding-api/build.gradle index cee61eb8767..6be64473e26 100644 --- a/apps/sykemelding-api/build.gradle +++ b/apps/sykemelding-api/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -76,7 +76,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'net.logstash.logback:logstash-logback-encoder:7.3' implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.0.3' diff --git a/apps/synt-sykemelding-api/Dockerfile b/apps/synt-sykemelding-api/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/synt-sykemelding-api/Dockerfile +++ b/apps/synt-sykemelding-api/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index 96c2f8e2edc..6fdcbb77c20 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/synt-vedtakshistorikk-service/Dockerfile b/apps/synt-vedtakshistorikk-service/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/synt-vedtakshistorikk-service/Dockerfile +++ b/apps/synt-vedtakshistorikk-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/synt-vedtakshistorikk-service/build.gradle b/apps/synt-vedtakshistorikk-service/build.gradle index 1787ffcc3e1..03d729173d4 100644 --- a/apps/synt-vedtakshistorikk-service/build.gradle +++ b/apps/synt-vedtakshistorikk-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/testnav-ident-pool/Dockerfile b/apps/testnav-ident-pool/Dockerfile index 6d9f495a63e..2e4b46593a7 100644 --- a/apps/testnav-ident-pool/Dockerfile +++ b/apps/testnav-ident-pool/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED" diff --git a/apps/testnav-ident-pool/build.gradle b/apps/testnav-ident-pool/build.gradle index 41a8d67c400..3838054057c 100644 --- a/apps/testnav-ident-pool/build.gradle +++ b/apps/testnav-ident-pool/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/testnorge-bisys/Dockerfile b/apps/testnorge-bisys/Dockerfile index bc32367ff9d..8d0968e8aad 100644 --- a/apps/testnorge-bisys/Dockerfile +++ b/apps/testnorge-bisys/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/testnorge-bisys/build.gradle b/apps/testnorge-bisys/build.gradle index 9ae2c253201..cc4d314239f 100644 --- a/apps/testnorge-bisys/build.gradle +++ b/apps/testnorge-bisys/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "2.7.5" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/testnorge-statisk-data-forvalter/Dockerfile b/apps/testnorge-statisk-data-forvalter/Dockerfile index d990b97e4d1..f24ed075a84 100644 --- a/apps/testnorge-statisk-data-forvalter/Dockerfile +++ b/apps/testnorge-statisk-data-forvalter/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" COPY /init.sh /init-scripts/init.sh diff --git a/apps/testnorge-statisk-data-forvalter/build.gradle b/apps/testnorge-statisk-data-forvalter/build.gradle index 21a714a8906..7853b5ceb7d 100644 --- a/apps/testnorge-statisk-data-forvalter/build.gradle +++ b/apps/testnorge-statisk-data-forvalter/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -92,7 +92,7 @@ dependencies { implementation 'org.apache.httpcomponents.client5:httpclient5:5.2.1' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'com.squareup.okhttp3:okhttp:4.9.3' implementation 'org.projectlombok:lombok' diff --git a/apps/testnorge-tp/Dockerfile b/apps/testnorge-tp/Dockerfile index 2e6101e2cff..44c2cf1c827 100644 --- a/apps/testnorge-tp/Dockerfile +++ b/apps/testnorge-tp/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Registre" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/testnorge-tp/build.gradle b/apps/testnorge-tp/build.gradle index 6a10b95f345..a79a3106ab5 100644 --- a/apps/testnorge-tp/build.gradle +++ b/apps/testnorge-tp/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/tilbakemelding-api/Dockerfile b/apps/tilbakemelding-api/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/apps/tilbakemelding-api/Dockerfile +++ b/apps/tilbakemelding-api/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/apps/tilbakemelding-api/build.gradle b/apps/tilbakemelding-api/build.gradle index 1873453bbb5..aa3a26bd6ed 100644 --- a/apps/tilbakemelding-api/build.gradle +++ b/apps/tilbakemelding-api/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/tps-messaging-service/Dockerfile b/apps/tps-messaging-service/Dockerfile index 6d9f495a63e..2e4b46593a7 100644 --- a/apps/tps-messaging-service/Dockerfile +++ b/apps/tps-messaging-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED" diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index 30bb9c20429..0066acbe4ca 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/udi-stub/Dockerfile b/apps/udi-stub/Dockerfile index 00f85d93604..372253b99f6 100644 --- a/apps/udi-stub/Dockerfile +++ b/apps/udi-stub/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod --add-opens java.base/java.lang=ALL-UNNAMED" diff --git a/apps/udi-stub/build.gradle b/apps/udi-stub/build.gradle index 6308834f35c..36b8122e76e 100644 --- a/apps/udi-stub/build.gradle +++ b/apps/udi-stub/build.gradle @@ -3,7 +3,7 @@ plugins { id 'java' id "uk.co.boothen.gradle.wsimport" version "0.18" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/varslinger-service/Dockerfile b/apps/varslinger-service/Dockerfile index 0d92d80c213..89a589699dd 100644 --- a/apps/varslinger-service/Dockerfile +++ b/apps/varslinger-service/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/apps/varslinger-service/build.gradle b/apps/varslinger-service/build.gradle index e8c88cdc4a3..bc840f3f05a 100644 --- a/apps/varslinger-service/build.gradle +++ b/apps/varslinger-service/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/examples/reactive-rest-example/build.gradle b/examples/reactive-rest-example/build.gradle index c8ed3c58d34..d5f9003c669 100644 --- a/examples/reactive-rest-example/build.gradle +++ b/examples/reactive-rest-example/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/libs/commands/build.gradle b/libs/commands/build.gradle index d0e146aa6cf..8ba162028e3 100644 --- a/libs/commands/build.gradle +++ b/libs/commands/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/csv-converter/build.gradle b/libs/csv-converter/build.gradle index 0ca2de7c44a..1dc3aaf14ea 100644 --- a/libs/csv-converter/build.gradle +++ b/libs/csv-converter/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/data-transfer-objects/build.gradle b/libs/data-transfer-objects/build.gradle index 34b9232f85d..b4869a7a393 100644 --- a/libs/data-transfer-objects/build.gradle +++ b/libs/data-transfer-objects/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -31,7 +31,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } @@ -54,7 +54,7 @@ dependencies { implementation 'com.fasterxml.jackson.core:jackson-annotations' implementation 'com.fasterxml.jackson.core:jackson-databind' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'jakarta.validation:jakarta.validation-api' implementation 'jakarta.xml.bind:jakarta.xml.bind-api' implementation 'javax.xml.bind:jaxb-api:2.3.1' diff --git a/libs/database/build.gradle b/libs/database/build.gradle index c7f824cb616..236987b4332 100644 --- a/libs/database/build.gradle +++ b/libs/database/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -29,7 +29,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' } } diff --git a/libs/domain/build.gradle b/libs/domain/build.gradle index 6c6b995979d..328005948b5 100644 --- a/libs/domain/build.gradle +++ b/libs/domain/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/integration-test/build.gradle b/libs/integration-test/build.gradle index 0eb79a9af11..1281b0ddec8 100644 --- a/libs/integration-test/build.gradle +++ b/libs/integration-test/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -34,7 +34,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/kafka-config/build.gradle b/libs/kafka-config/build.gradle index 66d1ab34c6f..fba140f4eae 100644 --- a/libs/kafka-config/build.gradle +++ b/libs/kafka-config/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/kafka-producers/build.gradle b/libs/kafka-producers/build.gradle index 63bb024376e..71a0365e950 100644 --- a/libs/kafka-producers/build.gradle +++ b/libs/kafka-producers/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } group = 'no.nav.testnav.libs' diff --git a/libs/reactive-core/build.gradle b/libs/reactive-core/build.gradle index d0abafc1602..f5bf489c694 100644 --- a/libs/reactive-core/build.gradle +++ b/libs/reactive-core/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -35,7 +35,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/reactive-frontend/build.gradle b/libs/reactive-frontend/build.gradle index 4607ddca621..2e82aa9ae67 100644 --- a/libs/reactive-frontend/build.gradle +++ b/libs/reactive-frontend/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -40,7 +40,7 @@ dependencyManagement { applyMavenExclusions = false imports { mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/reactive-proxy/build.gradle b/libs/reactive-proxy/build.gradle index f959d6e4ed5..48be5157b36 100644 --- a/libs/reactive-proxy/build.gradle +++ b/libs/reactive-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -39,7 +39,7 @@ dependencyManagement { applyMavenExclusions = false imports { mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/reactive-security/build.gradle b/libs/reactive-security/build.gradle index a69f4d3095e..60e5d105815 100644 --- a/libs/reactive-security/build.gradle +++ b/libs/reactive-security/build.gradle @@ -2,7 +2,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' id 'maven-publish' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -79,7 +79,7 @@ publishing { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/reactive-session-security/build.gradle b/libs/reactive-session-security/build.gradle index d4f9044cffa..3afc0d51173 100644 --- a/libs/reactive-session-security/build.gradle +++ b/libs/reactive-session-security/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' mavenBom 'org.springframework.session:spring-session-bom:2021.0.3' } } diff --git a/libs/security-core/build.gradle b/libs/security-core/build.gradle index 0fa7e98a243..29d6140ff87 100644 --- a/libs/security-core/build.gradle +++ b/libs/security-core/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/security-token-service/build.gradle b/libs/security-token-service/build.gradle index 5cbaf72b6f1..8a74c343c24 100644 --- a/libs/security-token-service/build.gradle +++ b/libs/security-token-service/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/servlet-core/build.gradle b/libs/servlet-core/build.gradle index 5223aa06410..d309134ed24 100644 --- a/libs/servlet-core/build.gradle +++ b/libs/servlet-core/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -34,7 +34,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } @@ -53,7 +53,7 @@ java { dependencies { - implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.10' + implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-actuator' diff --git a/libs/servlet-insecure-security/build.gradle b/libs/servlet-insecure-security/build.gradle index b47ed0e8601..f18fc4e1f0e 100644 --- a/libs/servlet-insecure-security/build.gradle +++ b/libs/servlet-insecure-security/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -32,7 +32,7 @@ group = 'no.nav.testnav.libs' dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/servlet-security/build.gradle b/libs/servlet-security/build.gradle index 058d9071442..ee5f5e82f03 100644 --- a/libs/servlet-security/build.gradle +++ b/libs/servlet-security/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -30,7 +30,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/slack/build.gradle b/libs/slack/build.gradle index 1e24d87ae6b..39318aa9423 100644 --- a/libs/slack/build.gradle +++ b/libs/slack/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -29,7 +29,7 @@ sonarqube { dependencyManagement { applyMavenExclusions = false imports { - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/libs/testing/build.gradle b/libs/testing/build.gradle index cd6d8727ad7..d6d91efdf37 100644 --- a/libs/testing/build.gradle +++ b/libs/testing/build.gradle @@ -1,7 +1,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id 'java-library' - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } @@ -38,7 +38,7 @@ dependencyManagement { applyMavenExclusions = false imports { mavenBom 'org.springframework.cloud:spring-cloud-dependencies:2022.0.4' - mavenBom 'org.springframework.boot:spring-boot-dependencies:3.0.4' + mavenBom 'org.springframework.boot:spring-boot-dependencies:3.1.4' } } diff --git a/mocks/maskinporten-mock/Dockerfile b/mocks/maskinporten-mock/Dockerfile index 0d92d80c213..89a589699dd 100644 --- a/mocks/maskinporten-mock/Dockerfile +++ b/mocks/maskinporten-mock/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ADD /build/libs/app.jar /app/app.jar diff --git a/mocks/maskinporten-mock/build.gradle b/mocks/maskinporten-mock/build.gradle index 22784e777bb..d124cdf81ab 100644 --- a/mocks/maskinporten-mock/build.gradle +++ b/mocks/maskinporten-mock/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" } bootJar { diff --git a/mocks/tokendings-mock/Dockerfile b/mocks/tokendings-mock/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/mocks/tokendings-mock/Dockerfile +++ b/mocks/tokendings-mock/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/mocks/tokendings-mock/build.gradle b/mocks/tokendings-mock/build.gradle index f620c5737de..3fad3783972 100644 --- a/mocks/tokendings-mock/build.gradle +++ b/mocks/tokendings-mock/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" } bootJar { diff --git a/proxies/aareg-proxy/Dockerfile b/proxies/aareg-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/aareg-proxy/Dockerfile +++ b/proxies/aareg-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/aareg-proxy/build.gradle b/proxies/aareg-proxy/build.gradle index aa00d329e81..9f36ed3009a 100644 --- a/proxies/aareg-proxy/build.gradle +++ b/proxies/aareg-proxy/build.gradle @@ -1,6 +1,6 @@ plugins { id "io.freefair.lombok" version "6.6.2" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" diff --git a/proxies/aareg-synt-services-proxy/Dockerfile b/proxies/aareg-synt-services-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/aareg-synt-services-proxy/Dockerfile +++ b/proxies/aareg-synt-services-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/aareg-synt-services-proxy/build.gradle b/proxies/aareg-synt-services-proxy/build.gradle index ce4eda3631d..8c7fd711323 100644 --- a/proxies/aareg-synt-services-proxy/build.gradle +++ b/proxies/aareg-synt-services-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/arbeidsplassencv-proxy/Dockerfile b/proxies/arbeidsplassencv-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/arbeidsplassencv-proxy/Dockerfile +++ b/proxies/arbeidsplassencv-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/arbeidsplassencv-proxy/build.gradle b/proxies/arbeidsplassencv-proxy/build.gradle index 00e16338c3e..639577c5759 100644 --- a/proxies/arbeidsplassencv-proxy/build.gradle +++ b/proxies/arbeidsplassencv-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/arena-forvalteren-proxy/Dockerfile b/proxies/arena-forvalteren-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/arena-forvalteren-proxy/Dockerfile +++ b/proxies/arena-forvalteren-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/arena-forvalteren-proxy/build.gradle b/proxies/arena-forvalteren-proxy/build.gradle index b3a8cc6581b..954096f1327 100644 --- a/proxies/arena-forvalteren-proxy/build.gradle +++ b/proxies/arena-forvalteren-proxy/build.gradle @@ -3,7 +3,7 @@ plugins { id "io.freefair.lombok" version "6.6.2" id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/batch-adeo-proxy/Dockerfile b/proxies/batch-adeo-proxy/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/proxies/batch-adeo-proxy/Dockerfile +++ b/proxies/batch-adeo-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/batch-adeo-proxy/build.gradle b/proxies/batch-adeo-proxy/build.gradle index e7e5aae2121..7bcbb305c60 100644 --- a/proxies/batch-adeo-proxy/build.gradle +++ b/proxies/batch-adeo-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/brregstub-proxy/Dockerfile b/proxies/brregstub-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/brregstub-proxy/Dockerfile +++ b/proxies/brregstub-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/brregstub-proxy/build.gradle b/proxies/brregstub-proxy/build.gradle index 0598d4830de..6d28b871ccc 100644 --- a/proxies/brregstub-proxy/build.gradle +++ b/proxies/brregstub-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/dokarkiv-proxy/Dockerfile b/proxies/dokarkiv-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/dokarkiv-proxy/Dockerfile +++ b/proxies/dokarkiv-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/ereg-proxy/Dockerfile b/proxies/ereg-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/ereg-proxy/Dockerfile +++ b/proxies/ereg-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/ereg-proxy/build.gradle b/proxies/ereg-proxy/build.gradle index 28906ba86c8..c6e486eba0e 100644 --- a/proxies/ereg-proxy/build.gradle +++ b/proxies/ereg-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/histark-proxy/Dockerfile b/proxies/histark-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/histark-proxy/Dockerfile +++ b/proxies/histark-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/histark-proxy/build.gradle b/proxies/histark-proxy/build.gradle index 0d572bcd0b4..f66ce715015 100644 --- a/proxies/histark-proxy/build.gradle +++ b/proxies/histark-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/hodejegeren-proxy/Dockerfile b/proxies/hodejegeren-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/hodejegeren-proxy/Dockerfile +++ b/proxies/hodejegeren-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/hodejegeren-proxy/build.gradle b/proxies/hodejegeren-proxy/build.gradle index 8f1bd7a34e2..d71e1cd0d4a 100644 --- a/proxies/hodejegeren-proxy/build.gradle +++ b/proxies/hodejegeren-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/inntektstub-proxy/Dockerfile b/proxies/inntektstub-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/inntektstub-proxy/Dockerfile +++ b/proxies/inntektstub-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/inntektstub-proxy/build.gradle b/proxies/inntektstub-proxy/build.gradle index 38ac8dd63c2..b37322b86ae 100644 --- a/proxies/inntektstub-proxy/build.gradle +++ b/proxies/inntektstub-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/inst-proxy/Dockerfile b/proxies/inst-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/inst-proxy/Dockerfile +++ b/proxies/inst-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/inst-proxy/build.gradle b/proxies/inst-proxy/build.gradle index f2cd37bb634..c3d1c656237 100644 --- a/proxies/inst-proxy/build.gradle +++ b/proxies/inst-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/kodeverk-proxy/Dockerfile b/proxies/kodeverk-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/kodeverk-proxy/Dockerfile +++ b/proxies/kodeverk-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/kodeverk-proxy/build.gradle b/proxies/kodeverk-proxy/build.gradle index 56286d256ec..5dd27983cdc 100644 --- a/proxies/kodeverk-proxy/build.gradle +++ b/proxies/kodeverk-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/kontoregister-person-proxy/Dockerfile b/proxies/kontoregister-person-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/kontoregister-person-proxy/Dockerfile +++ b/proxies/kontoregister-person-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/kontoregister-person-proxy/build.gradle b/proxies/kontoregister-person-proxy/build.gradle index 31c487116fd..a66ba18c92c 100644 --- a/proxies/kontoregister-person-proxy/build.gradle +++ b/proxies/kontoregister-person-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/krrstub-proxy/Dockerfile b/proxies/krrstub-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/krrstub-proxy/Dockerfile +++ b/proxies/krrstub-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/krrstub-proxy/build.gradle b/proxies/krrstub-proxy/build.gradle index 618ab63d1a3..df66faf55d1 100644 --- a/proxies/krrstub-proxy/build.gradle +++ b/proxies/krrstub-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/medl-proxy/Dockerfile b/proxies/medl-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/medl-proxy/Dockerfile +++ b/proxies/medl-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/medl-proxy/build.gradle b/proxies/medl-proxy/build.gradle index 80c1ed634b4..c3db2d244cd 100644 --- a/proxies/medl-proxy/build.gradle +++ b/proxies/medl-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/norg2-proxy/Dockerfile b/proxies/norg2-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/norg2-proxy/Dockerfile +++ b/proxies/norg2-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/norg2-proxy/build.gradle b/proxies/norg2-proxy/build.gradle index bd72fe0563e..0c4986523e3 100644 --- a/proxies/norg2-proxy/build.gradle +++ b/proxies/norg2-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/pdl-proxy/Dockerfile b/proxies/pdl-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/pdl-proxy/Dockerfile +++ b/proxies/pdl-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/pdl-proxy/build.gradle b/proxies/pdl-proxy/build.gradle index 072b239d698..ca090468a17 100644 --- a/proxies/pdl-proxy/build.gradle +++ b/proxies/pdl-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/pensjon-testdata-facade-proxy/Dockerfile b/proxies/pensjon-testdata-facade-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/pensjon-testdata-facade-proxy/Dockerfile +++ b/proxies/pensjon-testdata-facade-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/pensjon-testdata-facade-proxy/build.gradle b/proxies/pensjon-testdata-facade-proxy/build.gradle index 3da7a5052fb..d798e0dd8a1 100644 --- a/proxies/pensjon-testdata-facade-proxy/build.gradle +++ b/proxies/pensjon-testdata-facade-proxy/build.gradle @@ -3,7 +3,7 @@ plugins { id "io.freefair.lombok" version "6.6.2" id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/saf-proxy/Dockerfile b/proxies/saf-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/saf-proxy/Dockerfile +++ b/proxies/saf-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/saf-proxy/build.gradle b/proxies/saf-proxy/build.gradle index adc5085c0e6..bd9ca319e31 100644 --- a/proxies/saf-proxy/build.gradle +++ b/proxies/saf-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/sigrunstub-proxy/Dockerfile b/proxies/sigrunstub-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/sigrunstub-proxy/Dockerfile +++ b/proxies/sigrunstub-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/sigrunstub-proxy/build.gradle b/proxies/sigrunstub-proxy/build.gradle index 5a0c6a7eec9..05dbdac524d 100644 --- a/proxies/sigrunstub-proxy/build.gradle +++ b/proxies/sigrunstub-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/skjermingsregister-proxy/Dockerfile b/proxies/skjermingsregister-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/skjermingsregister-proxy/Dockerfile +++ b/proxies/skjermingsregister-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/skjermingsregister-proxy/build.gradle b/proxies/skjermingsregister-proxy/build.gradle index ebb7c1519af..d3130addf59 100644 --- a/proxies/skjermingsregister-proxy/build.gradle +++ b/proxies/skjermingsregister-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/statisk-data-forvalter-proxy/Dockerfile b/proxies/statisk-data-forvalter-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/statisk-data-forvalter-proxy/Dockerfile +++ b/proxies/statisk-data-forvalter-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/statisk-data-forvalter-proxy/build.gradle b/proxies/statisk-data-forvalter-proxy/build.gradle index 5fa23c6dd42..d6debe1d77e 100644 --- a/proxies/statisk-data-forvalter-proxy/build.gradle +++ b/proxies/statisk-data-forvalter-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/synthdata-meldekort-proxy/Dockerfile b/proxies/synthdata-meldekort-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/synthdata-meldekort-proxy/Dockerfile +++ b/proxies/synthdata-meldekort-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/synthdata-meldekort-proxy/build.gradle b/proxies/synthdata-meldekort-proxy/build.gradle index dd6a9b4fc83..25aee316723 100644 --- a/proxies/synthdata-meldekort-proxy/build.gradle +++ b/proxies/synthdata-meldekort-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/tps-forvalteren-proxy/Dockerfile b/proxies/tps-forvalteren-proxy/Dockerfile index b7cc1ff2074..4a36f93546f 100644 --- a/proxies/tps-forvalteren-proxy/Dockerfile +++ b/proxies/tps-forvalteren-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/tps-forvalteren-proxy/build.gradle b/proxies/tps-forvalteren-proxy/build.gradle index a3688ec7312..f94b5026416 100644 --- a/proxies/tps-forvalteren-proxy/build.gradle +++ b/proxies/tps-forvalteren-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/proxies/udistub-proxy/Dockerfile b/proxies/udistub-proxy/Dockerfile index ee90eb57d3a..dd8161548f8 100644 --- a/proxies/udistub-proxy/Dockerfile +++ b/proxies/udistub-proxy/Dockerfile @@ -1,4 +1,4 @@ -FROM ghcr.io/navikt/baseimages/temurin:17 +FROM ghcr.io/navikt/baseimages/temurin:21 LABEL maintainer="Team Dolly" ENV JAVA_OPTS="-Dspring.profiles.active=prod" diff --git a/proxies/udistub-proxy/build.gradle b/proxies/udistub-proxy/build.gradle index 0f911e7a405..05ed5e945fc 100644 --- a/proxies/udistub-proxy/build.gradle +++ b/proxies/udistub-proxy/build.gradle @@ -2,7 +2,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" id 'org.springframework.boot' version "3.1.4" - id 'io.spring.dependency-management' version "1.1.0" + id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } From fdca125634488263f3b3e5aefd5073fe62ce530d Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 16 Oct 2023 16:08:32 +0200 Subject: [PATCH 07/18] * Migrert testnorge til Java 21, Spring 3.1.4 og Gradle 8.4 * En del refaktorering av deprecated funskjonalitet i dolly-backend #deploy-test-dolly-backend --- .../main/java/no/nav/dolly/DollyBackendApplicationStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java index 39fb82ea036..317d2b3da4a 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java @@ -9,4 +9,4 @@ public static void main(String[] args) { SpringApplication.run(DollyBackendApplicationStarter.class, args); } -} \ No newline at end of file +} From 4e10261461e131804ccab2372588bcedf8917480 Mon Sep 17 00:00:00 2001 From: stigus Date: Mon, 16 Oct 2023 16:19:57 +0200 Subject: [PATCH 08/18] * Migrert testnorge til Java 21, Spring 3.1.4 og Gradle 8.4 * En del refaktorering av deprecated funskjonalitet i dolly-backend #deploy-test-dolly-backend --- .github/workflows/common.workflow.backend.yml | 2 +- .../main/java/no/nav/dolly/DollyBackendApplicationStarter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/common.workflow.backend.yml b/.github/workflows/common.workflow.backend.yml index fe5f3cbbf93..bed676cceb0 100644 --- a/.github/workflows/common.workflow.backend.yml +++ b/.github/workflows/common.workflow.backend.yml @@ -93,7 +93,7 @@ jobs: uses: actions/setup-java@v3 with: distribution: temurin - java-version: 17 + java-version: 21 - name: "Gradle" env: GITHUB_USERNAME: token diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java index 317d2b3da4a..39fb82ea036 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java @@ -9,4 +9,4 @@ public static void main(String[] args) { SpringApplication.run(DollyBackendApplicationStarter.class, args); } -} +} \ No newline at end of file From b72eb63463df548e001cb3d62d9c61f972cf3c69 Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 17 Oct 2023 09:06:12 +0200 Subject: [PATCH 09/18] Fikset feilende tester i Dolly-backend #deploy-test-dolly-backend --- .../src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java | 2 +- .../main/java/no/nav/dolly/repository/BrukerRepository.java | 4 ++-- .../java/no/nav/dolly/service/BestillingMalServiceTest.java | 4 ---- .../dolly/service/OrganisasjonBestillingMalServiceTest.java | 3 --- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java index 61fb545a0fa..8341288aa0d 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java @@ -45,7 +45,7 @@ public class BestillingMal implements Serializable { private String malNavn; @ManyToOne - @JoinColumn(name = "BRUKER_ID") + @JoinColumn(name = "bruker_id") private Bruker bruker; @Column(name = "SIST_OPPDATERT", nullable = false) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java index 8154ecd97dd..3d878b3346e 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java @@ -1,15 +1,15 @@ package no.nav.dolly.repository; import no.nav.dolly.domain.jpa.Bruker; +import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; -import org.springframework.data.repository.Repository; import org.springframework.data.repository.query.Param; import java.util.List; import java.util.Optional; -public interface BrukerRepository extends Repository { +public interface BrukerRepository extends JpaRepository { void deleteByBrukerId(String brukerId); Bruker save(Bruker bruker); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java index cb0aa929d4a..ccafd6279b4 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java @@ -54,14 +54,12 @@ class BestillingMalServiceTest { private final static String NYTT_MALNAVN = "nyttMalnavn"; private final static String BEST_KRITERIER = "Testeteste"; private static final Bruker DUMMY_EN = Bruker.builder() - .id(1L) .brukerId("testbruker_en") .brukernavn("test_en") .brukertype(Bruker.Brukertype.AZURE) .epost("epost@test_en") .build(); private static final Bruker DUMMY_TO = Bruker.builder() - .id(2L) .brukerId("testbruker_to") .brukernavn("test_to") .brukertype(Bruker.Brukertype.AZURE) @@ -193,7 +191,6 @@ Bestilling saveDummyBestilling(Bruker bruker, Testgruppe testgruppe) { return bestillingRepository.save( Bestilling .builder() - .id(1L) .gruppe(testgruppe) .ferdig(false) .antallIdenter(1) @@ -215,7 +212,6 @@ Testgruppe saveDummyGruppe() { .navn(TESTGRUPPE) .hensikt(TESTGRUPPE) .datoEndret(LocalDate.now()) - .id(1L) .build() ); } diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java index 21c034cb3d1..fba61b55040 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/OrganisasjonBestillingMalServiceTest.java @@ -48,14 +48,12 @@ class OrganisasjonBestillingMalServiceTest { private final static String NYTT_MALNAVN = "nyttMalnavn"; private final static String BEST_KRITERIER = "Testeteste"; private static final Bruker DUMMY_EN = Bruker.builder() - .id(1L) .brukernavn("test_en") .brukerId("testbruker_en") .brukertype(Bruker.Brukertype.AZURE) .epost("epost@test_en") .build(); private static final Bruker DUMMY_TO = Bruker.builder() - .id(2L) .brukernavn("test_to") .brukerId("testbruker_to") .brukertype(Bruker.Brukertype.AZURE) @@ -174,7 +172,6 @@ OrganisasjonBestilling saveDummyBestilling(Bruker bruker) { return organisasjonBestillingRepository.save( OrganisasjonBestilling .builder() - .id(1L) .ferdig(false) .antall(1) .miljoer("q2") From 30c8141484674fa16e1e067c129038c3bc943036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristen=20H=C3=A6rum?= Date: Tue, 17 Oct 2023 09:29:07 +0200 Subject: [PATCH 10/18] Fix for response timeout #deploy-dolly-backend #deploy-test-dolly-backend (#3313) --- .../dolly/bestilling/personservice/PersonServiceConsumer.java | 3 +-- .../apps/personservice/consumer/v2/PdlPersonConsumer.java | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/personservice/PersonServiceConsumer.java b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/personservice/PersonServiceConsumer.java index 639baf87c99..7c18caa6b32 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/personservice/PersonServiceConsumer.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/bestilling/personservice/PersonServiceConsumer.java @@ -1,7 +1,6 @@ package no.nav.dolly.bestilling.personservice; import com.fasterxml.jackson.databind.ObjectMapper; -import io.netty.channel.ChannelOption; import no.nav.dolly.bestilling.ConsumerStatus; import no.nav.dolly.bestilling.personservice.command.PdlPersonerGetCommand; import no.nav.dolly.bestilling.personservice.command.PersonServiceExistCommand; @@ -54,7 +53,7 @@ public PersonServiceConsumer( .pendingAcquireMaxCount(5000) .pendingAcquireTimeout(Duration.ofMinutes(15)) .build()) - .option(ChannelOption.CONNECT_TIMEOUT_MILLIS, 5000))) + .responseTimeout(Duration.ofSeconds(5)))) .baseUrl(serverProperties.getUrl()) .build(); } diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v2/PdlPersonConsumer.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v2/PdlPersonConsumer.java index 2d0783f1226..40a69cb2909 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v2/PdlPersonConsumer.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/consumer/v2/PdlPersonConsumer.java @@ -53,7 +53,8 @@ public PdlPersonConsumer( .maxConnections(10) .pendingAcquireMaxCount(5000) .pendingAcquireTimeout(Duration.ofMinutes(15)) - .build()))) + .build()) + .responseTimeout(Duration.ofSeconds(5)))) .build(); } From fd38b4d19c1b979c79207ac1325345b1aae80609 Mon Sep 17 00:00:00 2001 From: Cato Olsen Date: Tue, 17 Oct 2023 10:19:33 +0200 Subject: [PATCH 11/18] Opprydding, la til manglende test for overrides. --- apps/budpro-service/README.md | 9 ++- .../budpro/TestBudproServiceApplication.java | 13 ---- .../budpro/generate/BudproControllerTest.java | 62 ++++++++++++++++++- 3 files changed, 69 insertions(+), 15 deletions(-) delete mode 100644 apps/budpro-service/src/test/java/no/nav/dolly/budpro/TestBudproServiceApplication.java diff --git a/apps/budpro-service/README.md b/apps/budpro-service/README.md index 845ecbaf2fa..b2f1db88d7c 100644 --- a/apps/budpro-service/README.md +++ b/apps/budpro-service/README.md @@ -1,9 +1,16 @@ +Dette er en tjeneste laget for [Team BudPro](https://teamkatalog.nav.no/team/abc1b143-87e3-45d1-8518-0efd23a775fa), for å generere NAV-ansatte og deres informasjon. + +Startes lokalt på samme måte som alle andre. Spring profile `local`, definer `spring.cloud.vault.token` fra Vault. +Swagger på http://localhost:8080/swagger. Se endepunkter under `budpro-controller`. Andre endepunkter er for å liste ut definerte grunnverdier. + +Kun én integrasjon, med _generer-navn-service_. + **Kilder:** *Kommuner:* > https://www.ssb.no/klass/klassifikasjoner/131 -*Stillinger: +*Stillinger:* > https://www.ssb.no/arbeid-og-lonn/sysselsetting/artikler/yrkeskatalogen *Organisasjonsenhet:* diff --git a/apps/budpro-service/src/test/java/no/nav/dolly/budpro/TestBudproServiceApplication.java b/apps/budpro-service/src/test/java/no/nav/dolly/budpro/TestBudproServiceApplication.java deleted file mode 100644 index 65f51d1a60e..00000000000 --- a/apps/budpro-service/src/test/java/no/nav/dolly/budpro/TestBudproServiceApplication.java +++ /dev/null @@ -1,13 +0,0 @@ -package no.nav.dolly.budpro; - -import org.springframework.boot.SpringApplication; -import org.springframework.boot.test.context.TestConfiguration; - -@TestConfiguration(proxyBeanMethods = false) -public class TestBudproServiceApplication { - - public static void main(String[] args) { - SpringApplication.from(BudproServiceApplication::main).with(TestBudproServiceApplication.class).run(args); - } - -} diff --git a/apps/budpro-service/src/test/java/no/nav/dolly/budpro/generate/BudproControllerTest.java b/apps/budpro-service/src/test/java/no/nav/dolly/budpro/generate/BudproControllerTest.java index 2e899fc199b..84e14433dae 100644 --- a/apps/budpro-service/src/test/java/no/nav/dolly/budpro/generate/BudproControllerTest.java +++ b/apps/budpro-service/src/test/java/no/nav/dolly/budpro/generate/BudproControllerTest.java @@ -1,5 +1,6 @@ package no.nav.dolly.budpro.generate; +import com.fasterxml.jackson.databind.ObjectMapper; import lombok.extern.slf4j.Slf4j; import no.nav.dolly.budpro.navn.GeneratedNameService; import org.junit.jupiter.api.AfterEach; @@ -10,6 +11,7 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.mock.mockito.MockBean; +import org.springframework.http.MediaType; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; @@ -20,6 +22,7 @@ import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.Mockito.when; import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get; +import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) @@ -31,6 +34,9 @@ class BudproControllerTest { @Autowired private MockMvc mockMvc; + @Autowired + private ObjectMapper objectMapper; + @MockBean private GeneratedNameService generatedNameService; @@ -75,7 +81,7 @@ void testThatNoSeedGivesDifferentResults() @Test void testThatSameSeedGivesSameResults() - throws Exception { + throws Exception { var result1 = mockMvc .perform(get("/api/random?seed={seed}&limit={limit}", 123L, 50)) .andExpect(status().isOk()) @@ -92,4 +98,58 @@ void testThatSameSeedGivesSameResults() .isEqualTo(result2); } + @Test + void testThatOverrideWorksAsIntended() + throws Exception { + var override = new BudproRecord( + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE", + "OVERRIDE" + ); + var json = mockMvc + .perform(post("/api/random?limit={limit}", 3) + .contentType(MediaType.APPLICATION_JSON) + .content(objectMapper.writeValueAsString(override))) + .andExpect(status().isOk()) + .andReturn() + .getResponse() + .getContentAsString(); + var result = objectMapper.readValue(json, BudproRecord[].class); + assertThat(result).allMatch(element -> element.equals(override)); + } + } From eba1b1a6a31eb0c6ef10f5dc03cb9a84bd3e070d Mon Sep 17 00:00:00 2001 From: Cato Olsen Date: Fri, 9 Jun 2023 12:11:34 +0200 Subject: [PATCH 12/18] Lagt til @JoinColumn pga. endring i Hibernate. --- .../repository/model/OrganisasjonModel.java | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/repository/model/OrganisasjonModel.java b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/repository/model/OrganisasjonModel.java index 7a712ce77d1..7172380ff5c 100644 --- a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/repository/model/OrganisasjonModel.java +++ b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/repository/model/OrganisasjonModel.java @@ -1,17 +1,6 @@ package no.nav.registre.testnorge.organisasjonfastedataservice.repository.model; -import jakarta.persistence.Column; -import jakarta.persistence.Convert; -import jakarta.persistence.Entity; -import jakarta.persistence.EntityListeners; -import jakarta.persistence.EnumType; -import jakarta.persistence.Enumerated; -import jakarta.persistence.FetchType; -import jakarta.persistence.Id; -import jakarta.persistence.OneToMany; -import jakarta.persistence.Table; -import jakarta.persistence.Temporal; -import jakarta.persistence.TemporalType; +import jakarta.persistence.*; import lombok.AllArgsConstructor; import lombok.Builder; import lombok.Data; @@ -51,7 +40,8 @@ public class OrganisasjonModel { @Column(name = "GRUPPE", nullable = false) private Gruppe gruppe; - @OneToMany(mappedBy = "overenhet", fetch = FetchType.LAZY) + @OneToMany(fetch = FetchType.LAZY) + @JoinColumn(name = "OVERENHET") @Builder.Default private List underenheter = new ArrayList<>(); From db6d0cc8c7e3053d29108f5369c11a616b88e7d3 Mon Sep 17 00:00:00 2001 From: Cato Olsen Date: Fri, 9 Jun 2023 10:24:49 +0200 Subject: [PATCH 13/18] =?UTF-8?q?Endrer=20config=20for=20test-alert,=20end?= =?UTF-8?q?ret=20navn=20p=C3=A5=20alerts=20til=20=C3=A5=20bli=20mer=20Aler?= =?UTF-8?q?tmanager-vennlige.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit (cherry picked from commit b8803064bd08121992760091ec14d6ec6cdf8792) --- .nais/alerting-dolly.yml | 68 +++++++++---------- .../nav/dolly/domain/jpa/BestillingMal.java | 2 +- .../dolly/repository/BrukerRepository.java | 4 +- .../service/BestillingMalServiceTest.java | 2 +- 4 files changed, 38 insertions(+), 38 deletions(-) diff --git a/.nais/alerting-dolly.yml b/.nais/alerting-dolly.yml index d5d026258a9..9257397ab68 100644 --- a/.nais/alerting-dolly.yml +++ b/.nais/alerting-dolly.yml @@ -6,6 +6,10 @@ metadata: labels: team: dolly spec: + receivers: + slack: + channel: "#dolly-alerts" + icon_emoji: ':dolly-panic:' groups: - name: dolly-alerts rules: @@ -14,53 +18,49 @@ spec: expr: 'kube_deployment_status_replicas_available{namespace = "dolly"} == 0' for: 5m annotations: - summary: 'Applikasjonen *{{ $labels.deployment }}* har hatt 0 replicas i >5min og er ikke tilgjengelig.' + summary: 'Applikasjonen {{ $labels.deployment }} har hatt 0 replicas i >5min og er ikke tilgjengelig.' action: | - Alertmanager: - Events: `kubectl describe pod -l app={{ $labels.deployment }}` - Logger: `kubectl logs -l app={{ $labels.deployment }}` - labels: - namespace: 'dolly' - severity: 'critical' + 'Events: `kubectl describe pod -l app={{ $labels.deployment }}`\n + Logger: `kubectl logs -l app={{ $labels.deployment }}`' + + - action: 'action' + alert: 'dolly-log-errors-test' + description: 'description' + documentation: 'https://www.nav.no' + expr: sum by (app) (increase(log_messages_errors{namespace="dolly",level="Error"}[15m] offset 30m) > 1) + for: 1m + severity: 'danger' + sla: 'sla'' + annotations: + summary: 'En applikasjon har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.' + - alert: 'dolly-log-errors' - expr: 'sum by (app,namespace) (increase(log_messages_errors{namespace="dolly",level="Error"}[15m]) > 1)' + expr: 'sum by (app) (increase(log_messages_errors{namespace="dolly",level="Error"}[15m]) > 1)' for: 1m annotations: - summary: 'Applikasjonen *{{ $labels.app }}* har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.' + summary: 'Applikasjonen {{ $labels.app }} har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.' action: | - Alertmanager: - Events: `kubectl describe pod -l app={{ $labels.app }}` - Logger: `kubectl logs -l app={{ $labels.app }}` - Kibana: - labels: - namespace: 'dolly' - severity: 'warning' + 'Events: `kubectl describe pod -l app={{ $labels.app }}`\n + Logger: `kubectl logs -l app={{ $labels.app }}`\n + Kibana: ``' - alert: 'dolly-server-http-5xx' - expr: 'sum by (app,namespace) (increase(http_server_requests_seconds_count{namespace="dolly",status=~"^5.."}[15m]) > 5)' + expr: 'sum by (app) (increase(http_server_requests_seconds_count{namespace="dolly",status=~"^5.."}[15m]) > 5)' for: 1m annotations: - summary: 'Applikasjonen *{{ $labels.app }}* har gitt mer enn 5 HTTP 5xx-responser i løpet av de siste 15 minuttene.' + summary: 'Applikasjonen {{ $labels.app }} har gitt mer enn 5 HTTP 5xx-responser i løpet av de siste 15 minuttene.' action: | - Alertmanager: - Events: `kubectl describe pod -l app={{ $labels.app }}` - Logger: `kubectl logs -l app={{ $labels.app }}` - Kibana: - labels: - namespace: 'dolly' - severity: 'warning' + 'Events: `kubectl describe pod -l app={{ $labels.app }}`\n + Logger: `kubectl logs -l app={{ $labels.app }}`\n + Kibana: ``' - alert: 'dolly-client-http-4xx' - expr: 'sum by (app,namespace) (increase(http_client_requests_seconds_count{namespace="dolly",status=~"^4.."}[15m]) > 5)' + expr: 'sum by (app) (increase(http_client_requests_seconds_count{namespace="dolly",http_status_code=~"^4.."}[15m]) > 5)' for: 1m annotations: - summary: 'Applikasjonen *{{ $labels.app }}* har fått mer enn 5 HTTP 4xx-responser i løpet av de siste 15 minuttene.' + summary: 'Applikasjonen {{ $labels.app }} har fått mer enn 5 HTTP 4xx-responser i løpet av de siste 15 minuttene.' action: | - Alertmanager: - Events: `kubectl describe pod -l app={{ $labels.app }}` - Logger: `kubectl logs -l app={{ $labels.app }}` - Kibana: - labels: - namespace: 'dolly' - severity: 'warning' + 'Events: `kubectl describe pod -l app={{ $labels.app }}`\n + Logger: `kubectl logs -l app={{ $labels.app }}`\n + Kibana: ``' diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java index 8341288aa0d..61fb545a0fa 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/domain/jpa/BestillingMal.java @@ -45,7 +45,7 @@ public class BestillingMal implements Serializable { private String malNavn; @ManyToOne - @JoinColumn(name = "bruker_id") + @JoinColumn(name = "BRUKER_ID") private Bruker bruker; @Column(name = "SIST_OPPDATERT", nullable = false) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java index 3d878b3346e..8154ecd97dd 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/repository/BrukerRepository.java @@ -1,15 +1,15 @@ package no.nav.dolly.repository; import no.nav.dolly.domain.jpa.Bruker; -import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.Modifying; import org.springframework.data.jpa.repository.Query; +import org.springframework.data.repository.Repository; import org.springframework.data.repository.query.Param; import java.util.List; import java.util.Optional; -public interface BrukerRepository extends JpaRepository { +public interface BrukerRepository extends Repository { void deleteByBrukerId(String brukerId); Bruker save(Bruker bruker); diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java index ccafd6279b4..456e7747d66 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java @@ -222,8 +222,8 @@ void saveDummyBruker(Bruker bruker) { void deleteAllDatabaseContent() { bestillingMalRepository.deleteAll(); - bestillingRepository.deleteAll(); identRepository.deleteAll(); + bestillingRepository.deleteAll(); brukerFavoritterRepository.deleteAll(); testgruppeRepository.findAll(Sort.unsorted()).forEach(gruppe -> testgruppeRepository.deleteTestgruppeById(gruppe.getId())); brukerRepository.deleteByBrukerId(DUMMY_EN.getBrukerId()); From 242209f2848bb8be29bcd9bc8d2be61c14051429 Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 17 Oct 2023 10:55:57 +0200 Subject: [PATCH 14/18] Fikset feilende tester i Dolly-backend #deploy-test-dolly-backend --- .../dolly/service/BestillingMalServiceTest.java | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java index 456e7747d66..939eb4042e7 100644 --- a/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java +++ b/apps/dolly-backend/src/test/java/no/nav/dolly/service/BestillingMalServiceTest.java @@ -22,7 +22,6 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc; import org.springframework.boot.test.context.SpringBootTest; import org.springframework.context.annotation.ComponentScan; -import org.springframework.data.domain.Sort; import org.springframework.test.context.ActiveProfiles; import org.springframework.test.web.servlet.MockMvc; import org.springframework.transaction.annotation.Transactional; @@ -44,7 +43,7 @@ @SpringBootTest(webEnvironment = RANDOM_PORT) @ActiveProfiles("test") -@Testcontainers(disabledWithoutDocker = true) +@Testcontainers(disabledWithoutDocker = true, parallel = true) @EnableAutoConfiguration @ComponentScan("no.nav.dolly") @AutoConfigureMockMvc(addFilters = false) @@ -99,10 +98,8 @@ public void beforeEach() { MockedJwtAuthenticationTokenUtils.setJwtAuthenticationToken(); } - @Transactional @AfterEach public void afterEach() { - deleteAllDatabaseContent(); MockedJwtAuthenticationTokenUtils.clearJwtAuthenticationToken(); } @@ -219,14 +216,4 @@ Testgruppe saveDummyGruppe() { void saveDummyBruker(Bruker bruker) { brukerRepository.save(bruker); } - - void deleteAllDatabaseContent() { - bestillingMalRepository.deleteAll(); - identRepository.deleteAll(); - bestillingRepository.deleteAll(); - brukerFavoritterRepository.deleteAll(); - testgruppeRepository.findAll(Sort.unsorted()).forEach(gruppe -> testgruppeRepository.deleteTestgruppeById(gruppe.getId())); - brukerRepository.deleteByBrukerId(DUMMY_EN.getBrukerId()); - brukerRepository.deleteByBrukerId(DUMMY_TO.getBrukerId()); - } } \ No newline at end of file From 8c3d6f93317f7f6883f7c044b79e54604745b3c8 Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 17 Oct 2023 11:00:25 +0200 Subject: [PATCH 15/18] Cherry pick problematikk --- .nais/alerting-dolly.yml | 68 ++++++++++++++++++++-------------------- 1 file changed, 34 insertions(+), 34 deletions(-) diff --git a/.nais/alerting-dolly.yml b/.nais/alerting-dolly.yml index 9257397ab68..0dc10e4893e 100644 --- a/.nais/alerting-dolly.yml +++ b/.nais/alerting-dolly.yml @@ -6,10 +6,6 @@ metadata: labels: team: dolly spec: - receivers: - slack: - channel: "#dolly-alerts" - icon_emoji: ':dolly-panic:' groups: - name: dolly-alerts rules: @@ -18,49 +14,53 @@ spec: expr: 'kube_deployment_status_replicas_available{namespace = "dolly"} == 0' for: 5m annotations: - summary: 'Applikasjonen {{ $labels.deployment }} har hatt 0 replicas i >5min og er ikke tilgjengelig.' + summary: 'Applikasjonen *{{ $labels.deployment }}* har hatt 0 replicas i >5min og er ikke tilgjengelig.' action: | - 'Events: `kubectl describe pod -l app={{ $labels.deployment }}`\n - Logger: `kubectl logs -l app={{ $labels.deployment }}`' - - - action: 'action' - alert: 'dolly-log-errors-test' - description: 'description' - documentation: 'https://www.nav.no' - expr: sum by (app) (increase(log_messages_errors{namespace="dolly",level="Error"}[15m] offset 30m) > 1) - for: 1m - severity: 'danger' - sla: 'sla'' - annotations: - summary: 'En applikasjon har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.' - + Alertmanager: + Events: `kubectl describe pod -l app={{ $labels.deployment }}` + Logger: `kubectl logs -l app={{ $labels.deployment }}` + labels: + namespace: 'dolly' + severity: 'critical' - alert: 'dolly-log-errors' - expr: 'sum by (app) (increase(log_messages_errors{namespace="dolly",level="Error"}[15m]) > 1)' + expr: 'sum by (app,namespace) (increase(log_messages_errors{namespace="dolly",level="Error"}[15m]) > 1)' for: 1m annotations: - summary: 'Applikasjonen {{ $labels.app }} har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.' + summary: 'Applikasjonen *{{ $labels.app }}* har hatt mer enn 1 ERRORs i loggen i løpet av de siste 15 minuttene.' action: | - 'Events: `kubectl describe pod -l app={{ $labels.app }}`\n - Logger: `kubectl logs -l app={{ $labels.app }}`\n - Kibana: ``' + Alertmanager: + Events: `kubectl describe pod -l app={{ $labels.app }}` + Logger: `kubectl logs -l app={{ $labels.app }}` + Kibana: + labels: + namespace: 'dolly' + severity: 'warning' - alert: 'dolly-server-http-5xx' - expr: 'sum by (app) (increase(http_server_requests_seconds_count{namespace="dolly",status=~"^5.."}[15m]) > 5)' + expr: 'sum by (app,namespace) (increase(http_server_requests_seconds_count{namespace="dolly",status=~"^5.."}[15m]) > 5)' for: 1m annotations: - summary: 'Applikasjonen {{ $labels.app }} har gitt mer enn 5 HTTP 5xx-responser i løpet av de siste 15 minuttene.' + summary: 'Applikasjonen *{{ $labels.app }}* har gitt mer enn 5 HTTP 5xx-responser i løpet av de siste 15 minuttene.' action: | - 'Events: `kubectl describe pod -l app={{ $labels.app }}`\n - Logger: `kubectl logs -l app={{ $labels.app }}`\n - Kibana: ``' + Alertmanager: + Events: `kubectl describe pod -l app={{ $labels.app }}` + Logger: `kubectl logs -l app={{ $labels.app }}` + Kibana: + labels: + namespace: 'dolly' + severity: 'warning' - alert: 'dolly-client-http-4xx' - expr: 'sum by (app) (increase(http_client_requests_seconds_count{namespace="dolly",http_status_code=~"^4.."}[15m]) > 5)' + expr: 'sum by (app,namespace) (increase(http_client_requests_seconds_count{namespace="dolly",status=~"^4.."}[15m]) > 5)' for: 1m annotations: - summary: 'Applikasjonen {{ $labels.app }} har fått mer enn 5 HTTP 4xx-responser i løpet av de siste 15 minuttene.' + summary: 'Applikasjonen *{{ $labels.app }}* har fått mer enn 5 HTTP 4xx-responser i løpet av de siste 15 minuttene.' action: | - 'Events: `kubectl describe pod -l app={{ $labels.app }}`\n - Logger: `kubectl logs -l app={{ $labels.app }}`\n - Kibana: ``' + Alertmanager: + Events: `kubectl describe pod -l app={{ $labels.app }}` + Logger: `kubectl logs -l app={{ $labels.app }}` + Kibana: + labels: + namespace: 'dolly' + severity: 'warning' \ No newline at end of file From 3470369fddab8479c9ad216c4b82c22d586b3c92 Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 17 Oct 2023 12:08:41 +0200 Subject: [PATCH 16/18] Nytt navikt temurin baseimage for java 21 #deploy-test-dolly-backend --- .../main/java/no/nav/dolly/DollyBackendApplicationStarter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java index 39fb82ea036..317d2b3da4a 100644 --- a/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java +++ b/apps/dolly-backend/src/main/java/no/nav/dolly/DollyBackendApplicationStarter.java @@ -9,4 +9,4 @@ public static void main(String[] args) { SpringApplication.run(DollyBackendApplicationStarter.class, args); } -} \ No newline at end of file +} From 05e3710ca6722355691e1e010c0c7240041e8b4d Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 17 Oct 2023 14:22:58 +0200 Subject: [PATCH 17/18] Oppdatert deprecated securityconfig for alle applikasjoner --- apps/adresse-service/build.gradle | 2 +- .../adresseservice/config/SecurityConfig.java | 16 ++++------ apps/amelding-service/build.gradle | 2 +- apps/app-tilgang-analyse-service/build.gradle | 2 +- apps/arbeidsforhold-export-api/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/arbeidsforhold-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/batch-bestilling-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/brreg-stub/build.gradle | 2 +- apps/bruker-service/build.gradle | 2 +- apps/budpro-service/build.gradle | 14 +++++---- apps/dolly-backend/build.gradle | 2 +- apps/dolly-frontend/build.gradle | 2 +- apps/dollystatus/build.gradle | 2 +- apps/endringsmelding-frontend/build.gradle | 2 +- apps/endringsmelding-service/build.gradle | 2 +- apps/ereg-batch-status-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/faste-data-frontend/build.gradle | 2 +- .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/generer-navn-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../geografiske-kodeverk-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/helsepersonell-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/hodejegeren/build.gradle | 2 +- .../hodejegeren/config/SecurityConfig.java | 16 ++++------ apps/import-person-service/build.gradle | 2 +- .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/inntektsmelding-service/build.gradle | 2 +- .../jenkins-batch-status-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/joark-dokument-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/miljoer-service/build.gradle | 2 +- .../miljoerservice/config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../consumer/AaregSyntConsumer.java | 3 +- .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/organisasjon-forvalter/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/organisasjon-mottak-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/organisasjon-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../organisasjon-tilgang-service/build.gradle | 2 +- .../config/SecurityConfig.java | 30 +++++++++---------- .../OrganisasjonMiljoeConsumer.java | 2 +- .../service/MiljoerOversiktService.java | 2 +- apps/orgnummer-service/build.gradle | 2 +- .../orgnrservice/config/SecurityConfig.java | 16 ++++------ apps/oversikt-frontend/build.gradle | 2 +- apps/pdl-forvalter/build.gradle | 2 +- .../pdl/forvalter/config/SecurityConfig.java | 16 ++++------ apps/person-export-api/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/person-faste-data-service/build.gradle | 2 +- .../build.gradle | 2 +- apps/person-search-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/person-service/build.gradle | 2 +- .../personservice/config/SecurityConfig.java | 16 ++++------ apps/profil-api/build.gradle | 2 +- .../profil/config/SecurityConfiguration.java | 16 ++++------ apps/sykemelding-api/build.gradle | 2 +- .../sykemelding/config/SecurityConfig.java | 16 ++++------ apps/synt-sykemelding-api/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ .../build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/testnav-ident-pool/build.gradle | 2 +- .../identpool/config/SecurityConfig.java | 16 ++++------ apps/testnorge-bisys/build.gradle | 2 +- .../registre/bisys/config/VaultConfig.java | 2 +- .../build.gradle | 2 +- apps/testnorge-tp/build.gradle | 2 +- .../registre/tp/config/SecurityConfig.java | 16 ++++------ apps/tilbakemelding-api/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/tps-messaging-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ apps/udi-stub/build.gradle | 2 +- .../no/nav/udistub/config/SecurityConfig.java | 24 ++++++++------- apps/varslinger-service/build.gradle | 2 +- .../config/SecurityConfig.java | 16 ++++------ examples/reactive-rest-example/build.gradle | 2 +- libs/servlet-security/build.gradle | 2 +- mocks/maskinporten-mock/build.gradle | 2 +- .../tokendingsmock/config/SecurityConfig.java | 2 +- mocks/tokendings-mock/build.gradle | 2 +- .../tokendingsmock/config/SecurityConfig.java | 2 +- proxies/aareg-proxy/build.gradle | 2 +- .../aareg-synt-services-proxy/build.gradle | 2 +- proxies/arbeidsplassencv-proxy/build.gradle | 2 +- proxies/arena-forvalteren-proxy/build.gradle | 2 +- proxies/batch-adeo-proxy/build.gradle | 2 +- proxies/brregstub-proxy/build.gradle | 2 +- proxies/dokarkiv-proxy/build.gradle | 2 +- proxies/ereg-proxy/build.gradle | 2 +- proxies/histark-proxy/build.gradle | 2 +- proxies/hodejegeren-proxy/build.gradle | 2 +- proxies/inntektstub-proxy/build.gradle | 2 +- proxies/inst-proxy/build.gradle | 2 +- proxies/kodeverk-proxy/build.gradle | 2 +- .../kontoregister-person-proxy/build.gradle | 2 +- proxies/krrstub-proxy/build.gradle | 2 +- proxies/medl-proxy/build.gradle | 2 +- proxies/norg2-proxy/build.gradle | 2 +- proxies/pdl-proxy/build.gradle | 2 +- .../build.gradle | 2 +- proxies/saf-proxy/build.gradle | 2 +- proxies/sigrunstub-proxy/build.gradle | 2 +- proxies/skjermingsregister-proxy/build.gradle | 2 +- .../statisk-data-forvalter-proxy/build.gradle | 2 +- .../synthdata-meldekort-proxy/build.gradle | 2 +- proxies/tps-forvalteren-proxy/build.gradle | 2 +- proxies/udistub-proxy/build.gradle | 2 +- 133 files changed, 351 insertions(+), 496 deletions(-) diff --git a/apps/adresse-service/build.gradle b/apps/adresse-service/build.gradle index b711d124cfd..2f6831a7e0d 100644 --- a/apps/adresse-service/build.gradle +++ b/apps/adresse-service/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.aspectj:aspectjweaver:1.9.7' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' diff --git a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java index ae0570d7540..bfbd2872db7 100644 --- a/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java +++ b/apps/adresse-service/src/main/java/no/nav/testnav/apps/adresseservice/config/SecurityConfig.java @@ -18,11 +18,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -31,11 +29,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/amelding-service/build.gradle b/apps/amelding-service/build.gradle index 4da0b508de2..f4bb4403916 100644 --- a/apps/amelding-service/build.gradle +++ b/apps/amelding-service/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/app-tilgang-analyse-service/build.gradle b/apps/app-tilgang-analyse-service/build.gradle index 32a1365b483..0a1cc37a85c 100644 --- a/apps/app-tilgang-analyse-service/build.gradle +++ b/apps/app-tilgang-analyse-service/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.flywaydb:flyway-core' implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-yaml' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' diff --git a/apps/arbeidsforhold-export-api/build.gradle b/apps/arbeidsforhold-export-api/build.gradle index 381391e0b7b..7231e082a53 100644 --- a/apps/arbeidsforhold-export-api/build.gradle +++ b/apps/arbeidsforhold-export-api/build.gradle @@ -75,7 +75,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' runtimeOnly 'com.oracle.database.jdbc:ojdbc8' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java index 24d06673560..4ad8029350a 100644 --- a/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java +++ b/apps/arbeidsforhold-export-api/src/main/java/no/nav/no/registere/testnorge/arbeidsforholdexportapi/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/arbeidsforhold-service/build.gradle b/apps/arbeidsforhold-service/build.gradle index fbb3e84018d..88d5afaa511 100644 --- a/apps/arbeidsforhold-service/build.gradle +++ b/apps/arbeidsforhold-service/build.gradle @@ -83,7 +83,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java index e78ca38b19d..49ab0aab175 100644 --- a/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java +++ b/apps/arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/arbeidsforholdservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/batch-bestilling-service/build.gradle b/apps/batch-bestilling-service/build.gradle index ddc43abc54e..263a06d8ce3 100644 --- a/apps/batch-bestilling-service/build.gradle +++ b/apps/batch-bestilling-service/build.gradle @@ -70,7 +70,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java index bc3559dfc14..32cd0eb1517 100644 --- a/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java +++ b/apps/batch-bestilling-service/src/main/java/no/nav/registre/testnorge/batchbestillingservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index b1447c77f1d..460fc4d7a7f 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -105,7 +105,7 @@ dependencies { implementation 'org.apache.cxf:cxf-rt-frontend-jaxws:3.5.5' implementation 'wsdl4j:wsdl4j:1.6.3' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'javax.validation:validation-api:2.0.1.Final' implementation 'org.springdoc:springdoc-openapi-ui:1.6.15' diff --git a/apps/bruker-service/build.gradle b/apps/bruker-service/build.gradle index de2feea74b3..9dbe2ff8f22 100644 --- a/apps/bruker-service/build.gradle +++ b/apps/bruker-service/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'io.r2dbc:r2dbc-h2' diff --git a/apps/budpro-service/build.gradle b/apps/budpro-service/build.gradle index 682f2c29b2b..d0adf882a0a 100644 --- a/apps/budpro-service/build.gradle +++ b/apps/budpro-service/build.gradle @@ -1,15 +1,11 @@ plugins { id 'java' - id 'org.springframework.boot' version '3.1.2' - id 'io.spring.dependency-management' version '1.1.2' + id 'org.springframework.boot' version '3.1.4' + id 'io.spring.dependency-management' version '1.1.3' id "jacoco" id "org.sonarqube" version "4.0.0.2929" } -java { - sourceCompatibility = '17' -} - bootJar { archiveFileName = "app.jar" mainClass = 'no.nav.dolly.budpro.BudproServiceApplication' @@ -21,6 +17,12 @@ configurations { } } +java { + toolchain { + languageVersion = JavaLanguageVersion.of(21) + } +} + repositories { mavenCentral() mavenLocal() diff --git a/apps/dolly-backend/build.gradle b/apps/dolly-backend/build.gradle index 7caf1adf626..8921113cd3e 100644 --- a/apps/dolly-backend/build.gradle +++ b/apps/dolly-backend/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-vault-config-databases' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' diff --git a/apps/dolly-frontend/build.gradle b/apps/dolly-frontend/build.gradle index 5820d0d7e43..ab2eb4e57e1 100644 --- a/apps/dolly-frontend/build.gradle +++ b/apps/dolly-frontend/build.gradle @@ -85,7 +85,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/dollystatus/build.gradle b/apps/dollystatus/build.gradle index 61084c8e424..a143f42624f 100644 --- a/apps/dollystatus/build.gradle +++ b/apps/dollystatus/build.gradle @@ -43,7 +43,7 @@ repositories { dependencies { implementation 'org.springframework.boot:spring-boot-starter-web' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' } java { diff --git a/apps/endringsmelding-frontend/build.gradle b/apps/endringsmelding-frontend/build.gradle index 0bc6991138d..de0fc9248f5 100644 --- a/apps/endringsmelding-frontend/build.gradle +++ b/apps/endringsmelding-frontend/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/endringsmelding-service/build.gradle b/apps/endringsmelding-service/build.gradle index 7b2899c0aef..f7e4f656ee1 100644 --- a/apps/endringsmelding-service/build.gradle +++ b/apps/endringsmelding-service/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/ereg-batch-status-service/build.gradle b/apps/ereg-batch-status-service/build.gradle index 8590860764b..3a1be419c17 100644 --- a/apps/ereg-batch-status-service/build.gradle +++ b/apps/ereg-batch-status-service/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java index 553b126625d..1f8827a51ab 100644 --- a/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java +++ b/apps/ereg-batch-status-service/src/main/java/no/nav/registre/testnorge/eregbatchstatusservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/faste-data-frontend/build.gradle b/apps/faste-data-frontend/build.gradle index 3d9bc024077..4e01c3b67bf 100644 --- a/apps/faste-data-frontend/build.gradle +++ b/apps/faste-data-frontend/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-actuator' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/generer-arbeidsforhold-populasjon-service/build.gradle b/apps/generer-arbeidsforhold-populasjon-service/build.gradle index 6f863e3fbef..cd7af023009 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/build.gradle +++ b/apps/generer-arbeidsforhold-populasjon-service/build.gradle @@ -65,7 +65,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java index a96a43c1f17..8c1916bc076 100644 --- a/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java +++ b/apps/generer-arbeidsforhold-populasjon-service/src/main/java/no/nav/registre/testnav/genererarbeidsforholdpopulasjonservice/config/SecurityConfig.java @@ -17,11 +17,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -30,11 +28,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/generer-navn-service/build.gradle b/apps/generer-navn-service/build.gradle index f6122f5aa5e..b7f284be411 100644 --- a/apps/generer-navn-service/build.gradle +++ b/apps/generer-navn-service/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java b/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java index 1e18690c84e..d3074d33910 100644 --- a/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java +++ b/apps/generer-navn-service/src/main/java/no/nav/registre/testnorge/generernavnservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/generer-organisasjon-populasjon-service/build.gradle b/apps/generer-organisasjon-populasjon-service/build.gradle index 8cecb8ef4cb..031b4f63a63 100644 --- a/apps/generer-organisasjon-populasjon-service/build.gradle +++ b/apps/generer-organisasjon-populasjon-service/build.gradle @@ -83,7 +83,7 @@ dependencies { implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' diff --git a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java index 8f4f0e01eb2..d816bad522e 100644 --- a/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java +++ b/apps/generer-organisasjon-populasjon-service/src/main/java/no/nav/registre/testnav/genererorganisasjonpopulasjonservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/generer-synt-amelding-service/build.gradle b/apps/generer-synt-amelding-service/build.gradle index 8e76291ecc3..b790e8ddd0e 100644 --- a/apps/generer-synt-amelding-service/build.gradle +++ b/apps/generer-synt-amelding-service/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java b/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java index ba9152b8ab8..ba5d4c0f263 100644 --- a/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java +++ b/apps/generer-synt-amelding-service/src/main/java/no/nav/registre/testnorge/generersyntameldingservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/geografiske-kodeverk-service/build.gradle b/apps/geografiske-kodeverk-service/build.gradle index af34e276b99..73b7e394fc1 100644 --- a/apps/geografiske-kodeverk-service/build.gradle +++ b/apps/geografiske-kodeverk-service/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.projectlombok:lombok' diff --git a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java index 481887c57f4..a12df16bbf3 100644 --- a/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java +++ b/apps/geografiske-kodeverk-service/src/main/java/no/nav/registre/testnav/geografiskekodeverkservice/config/SecurityConfig.java @@ -18,11 +18,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -31,11 +29,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/helsepersonell-service/build.gradle b/apps/helsepersonell-service/build.gradle index 1748a0a3505..c0d63451a3d 100644 --- a/apps/helsepersonell-service/build.gradle +++ b/apps/helsepersonell-service/build.gradle @@ -66,7 +66,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java b/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java index 9dd7bdec7fa..36cc85e0096 100644 --- a/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java +++ b/apps/helsepersonell-service/src/main/java/no/nav/registre/testnorge/helsepersonellservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/hodejegeren/build.gradle b/apps/hodejegeren/build.gradle index 1ea4d4326da..d705d72454e 100644 --- a/apps/hodejegeren/build.gradle +++ b/apps/hodejegeren/build.gradle @@ -75,7 +75,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'no.nav.registre:testnorge-consumers:1.12.0-RELEASE' implementation 'com.google.guava:guava:31.0.1-jre' diff --git a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java index 6a312b69aea..0095449043f 100644 --- a/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java +++ b/apps/hodejegeren/src/main/java/no/nav/testnav/apps/hodejegeren/config/SecurityConfig.java @@ -20,11 +20,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -33,11 +31,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/import-person-service/build.gradle b/apps/import-person-service/build.gradle index c4f59902358..476442b83dc 100644 --- a/apps/import-person-service/build.gradle +++ b/apps/import-person-service/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/inntektsmelding-generator-service/build.gradle b/apps/inntektsmelding-generator-service/build.gradle index 8181b0d1e82..5467e18022e 100644 --- a/apps/inntektsmelding-generator-service/build.gradle +++ b/apps/inntektsmelding-generator-service/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' implementation 'org.apache.commons:commons-text:1.10.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:1.2019.08.16-13.46-35cbdfd492d4' diff --git a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java index 56297947440..ac472015258 100644 --- a/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java +++ b/apps/inntektsmelding-generator-service/src/main/java/no/nav/registre/inntektsmeldinggeneratorservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/inntektsmelding-service/build.gradle b/apps/inntektsmelding-service/build.gradle index b655fadd6fd..800a23e507d 100644 --- a/apps/inntektsmelding-service/build.gradle +++ b/apps/inntektsmelding-service/build.gradle @@ -74,7 +74,7 @@ dependencies { implementation 'com.fasterxml.jackson.dataformat:jackson-dataformat-xml' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'no.nav.tjenestespesifikasjoner:nav-altinn-inntektsmelding:1.2019.08.16-13.46-35cbdfd492d4' implementation 'org.apache.commons:commons-io:1.3.2' diff --git a/apps/jenkins-batch-status-service/build.gradle b/apps/jenkins-batch-status-service/build.gradle index 22465348e91..3492add236c 100644 --- a/apps/jenkins-batch-status-service/build.gradle +++ b/apps/jenkins-batch-status-service/build.gradle @@ -70,7 +70,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java index 1e5d089596a..077cd1e8404 100644 --- a/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java +++ b/apps/jenkins-batch-status-service/src/main/java/no/nav/registre/testnorge/jenkinsbatchstatusservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/joark-dokument-service/build.gradle b/apps/joark-dokument-service/build.gradle index d3ac51d11bb..48a30b6d2b6 100644 --- a/apps/joark-dokument-service/build.gradle +++ b/apps/joark-dokument-service/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java index fbe15b8e9aa..e79d497ca23 100644 --- a/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java +++ b/apps/joark-dokument-service/src/main/java/no/nav/testnav/joarkdokumentservice/config/SecurityConfig.java @@ -15,11 +15,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -28,11 +26,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/miljoer-service/build.gradle b/apps/miljoer-service/build.gradle index dcb4c77bbe5..6fe3cff5003 100644 --- a/apps/miljoer-service/build.gradle +++ b/apps/miljoer-service/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java index 66d3b813258..522cce01713 100644 --- a/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java +++ b/apps/miljoer-service/src/main/java/no/nav/registre/testnorge/miljoerservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/mn-synt-arbeidsforhold-service/build.gradle b/apps/mn-synt-arbeidsforhold-service/build.gradle index d236347a58a..1e44dcfcb22 100644 --- a/apps/mn-synt-arbeidsforhold-service/build.gradle +++ b/apps/mn-synt-arbeidsforhold-service/build.gradle @@ -75,7 +75,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' diff --git a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java index 78a835348e8..0b881ad1a5e 100644 --- a/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java +++ b/apps/mn-synt-arbeidsforhold-service/src/main/java/no/nav/registre/testnorge/mn/syntarbeidsforholdservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index c92f246ba62..2fdead33ea3 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -88,7 +88,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springframework.kafka:spring-kafka' implementation 'org.apache.kafka:kafka-clients:7.0.0-ce' implementation 'io.confluent:kafka-avro-serializer:7.3.2' diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java index 73e06fb53c9..b2c598bed6d 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/config/SecurityConfig.java @@ -17,11 +17,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -30,11 +28,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/consumer/AaregSyntConsumer.java b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/consumer/AaregSyntConsumer.java index 2ead1f4bee9..2f4f456ee75 100644 --- a/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/consumer/AaregSyntConsumer.java +++ b/apps/oppsummeringsdokument-service/src/main/java/no/nav/testnav/apps/oppsummeringsdokumentservice/consumer/AaregSyntConsumer.java @@ -9,7 +9,6 @@ import no.nav.testnav.libs.servletsecurity.exchange.TokenExchange; import org.springframework.stereotype.Component; import org.springframework.web.reactive.function.client.WebClient; -import org.webjars.NotFoundException; import static java.util.Objects.isNull; @@ -44,7 +43,7 @@ public void saveOpplysningspliktig(Oppsummeringsdokument oppsummeringsdokument, private String getAccessToken() { var token = tokenExchange.exchange(properties).block(); if (isNull(token)) { - throw new NotFoundException("Klarte ikke å generere AccessToken for AaregSyntService"); + throw new IllegalArgumentException("Klarte ikke å generere AccessToken for AaregSyntService"); } return "Bearer " + token.getTokenValue(); } diff --git a/apps/organisasjon-bestilling-service/build.gradle b/apps/organisasjon-bestilling-service/build.gradle index 24bbdd8cc28..e99d498f3c3 100644 --- a/apps/organisasjon-bestilling-service/build.gradle +++ b/apps/organisasjon-bestilling-service/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java index d477eb23532..bcb3f47ed2b 100644 --- a/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java +++ b/apps/organisasjon-bestilling-service/src/main/java/no/nav/testnav/apps/organisasjonbestillingservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/organisasjon-faste-data-service/build.gradle b/apps/organisasjon-faste-data-service/build.gradle index 062adce1e16..e240141cb3e 100644 --- a/apps/organisasjon-faste-data-service/build.gradle +++ b/apps/organisasjon-faste-data-service/build.gradle @@ -82,7 +82,7 @@ dependencies { implementation 'com.h2database:h2' implementation 'org.postgresql:postgresql' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' implementation 'org.projectreactor:reactor-spring:1.0.1.RELEASE' diff --git a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java index f48bf795227..f5974fcc567 100644 --- a/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java +++ b/apps/organisasjon-faste-data-service/src/main/java/no/nav/registre/testnorge/organisasjonfastedataservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/organisasjon-forvalter/build.gradle b/apps/organisasjon-forvalter/build.gradle index f1628c68107..3fd67aed5d1 100644 --- a/apps/organisasjon-forvalter/build.gradle +++ b/apps/organisasjon-forvalter/build.gradle @@ -91,7 +91,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'ma.glasnost.orika:orika-core:1.5.4' diff --git a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java index a8d2a77227c..e37d7b8d39a 100644 --- a/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java +++ b/apps/organisasjon-forvalter/src/main/java/no/nav/organisasjonforvalter/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/organisasjon-mottak-service/build.gradle b/apps/organisasjon-mottak-service/build.gradle index 4fa3d9c884e..4721739e7b6 100644 --- a/apps/organisasjon-mottak-service/build.gradle +++ b/apps/organisasjon-mottak-service/build.gradle @@ -80,7 +80,7 @@ dependencies { implementation 'io.confluent:kafka-avro-serializer:7.3.2' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java index 0746e8d4821..a53b1c3f170 100644 --- a/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java +++ b/apps/organisasjon-mottak-service/src/main/java/no/nav/registre/testnorge/organisasjonmottak/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/organisasjon-service/build.gradle b/apps/organisasjon-service/build.gradle index c8c81b3596b..6daae6b29fa 100644 --- a/apps/organisasjon-service/build.gradle +++ b/apps/organisasjon-service/build.gradle @@ -68,7 +68,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'junit:junit:4.13.2' //TODO upgrade to JUnit5 testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java index 22fc9f755d9..57921c31110 100644 --- a/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java +++ b/apps/organisasjon-service/src/main/java/no/nav/registre/testnorge/organisasjonservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/organisasjon-tilgang-frontend/build.gradle b/apps/organisasjon-tilgang-frontend/build.gradle index 54b9e666c8b..16cf949b27a 100644 --- a/apps/organisasjon-tilgang-frontend/build.gradle +++ b/apps/organisasjon-tilgang-frontend/build.gradle @@ -73,7 +73,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/organisasjon-tilgang-service/build.gradle b/apps/organisasjon-tilgang-service/build.gradle index ab0cd9eeded..9daeab2a3db 100644 --- a/apps/organisasjon-tilgang-service/build.gradle +++ b/apps/organisasjon-tilgang-service/build.gradle @@ -74,7 +74,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java index 42ab4f83b98..5d163ab57d9 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/config/SecurityConfig.java @@ -2,6 +2,7 @@ import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; +import no.nav.testnav.libs.reactivesecurity.manager.JwtReactiveAuthenticationManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.method.configuration.EnableReactiveMethodSecurity; @@ -9,8 +10,6 @@ import org.springframework.security.config.web.server.ServerHttpSecurity; import org.springframework.security.web.server.SecurityWebFilterChain; -import no.nav.testnav.libs.reactivesecurity.manager.JwtReactiveAuthenticationManager; - @Slf4j @Configuration @@ -22,22 +21,21 @@ public class SecurityConfig { private final JwtReactiveAuthenticationManager jwtReactiveAuthenticationManager; @Bean - public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf().disable() - .authorizeExchange() - .pathMatchers( - "/swagger-ui.html", + public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { + return httpSecurity + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( + "/internal/**", "/webjars/**", + "/swagger-resources/**", "/v3/api-docs/**", - "/internal/metrics", - "/internal/isReady", - "/internal/isAlive" - ).permitAll() - .anyExchange().authenticated() - .and() - .oauth2ResourceServer() - .jwt(spec -> spec.authenticationManager(jwtReactiveAuthenticationManager)) - .and().build(); + "/swagger-ui/**", + "/swagger", + "/error", + "/swagger-ui.html" + ).permitAll().anyExchange().authenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })).build(); } } diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/controller/OrganisasjonMiljoeConsumer.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/controller/OrganisasjonMiljoeConsumer.java index 9334c3b08f7..394cf881b8d 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/controller/OrganisasjonMiljoeConsumer.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/controller/OrganisasjonMiljoeConsumer.java @@ -1,5 +1,6 @@ package no.nav.testnav.apps.organisasjontilgangservice.controller; +import javassist.NotFoundException; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import no.nav.testnav.apps.organisasjontilgangservice.database.entity.OrganisasjonTilgang; @@ -12,7 +13,6 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseStatus; import org.springframework.web.bind.annotation.RestController; -import org.webjars.NotFoundException; import reactor.core.publisher.Mono; @Slf4j diff --git a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/service/MiljoerOversiktService.java b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/service/MiljoerOversiktService.java index 12a066140ba..03410d82600 100644 --- a/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/service/MiljoerOversiktService.java +++ b/apps/organisasjon-tilgang-service/src/main/java/no/nav/testnav/apps/organisasjontilgangservice/service/MiljoerOversiktService.java @@ -1,11 +1,11 @@ package no.nav.testnav.apps.organisasjontilgangservice.service; +import javassist.NotFoundException; import lombok.RequiredArgsConstructor; import no.nav.testnav.apps.organisasjontilgangservice.consumer.altinn.v1.AltinnConsumer; import no.nav.testnav.apps.organisasjontilgangservice.database.entity.OrganisasjonTilgang; import no.nav.testnav.apps.organisasjontilgangservice.database.repository.OrganisasjonTilgangRepository; import org.springframework.stereotype.Service; -import org.webjars.NotFoundException; import reactor.core.publisher.Mono; import static org.apache.commons.lang3.BooleanUtils.isTrue; diff --git a/apps/orgnummer-service/build.gradle b/apps/orgnummer-service/build.gradle index 67d77214efe..5c5d9999502 100644 --- a/apps/orgnummer-service/build.gradle +++ b/apps/orgnummer-service/build.gradle @@ -75,7 +75,7 @@ dependencies { implementation 'com.h2database:h2' implementation 'com.zaxxer:HikariCP' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' diff --git a/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java b/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java index ae98c7161cc..31d224f17b1 100644 --- a/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java +++ b/apps/orgnummer-service/src/main/java/no/nav/registre/orgnrservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/oversikt-frontend/build.gradle b/apps/oversikt-frontend/build.gradle index b49a0984f75..bb7caaad950 100644 --- a/apps/oversikt-frontend/build.gradle +++ b/apps/oversikt-frontend/build.gradle @@ -71,7 +71,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/pdl-forvalter/build.gradle b/apps/pdl-forvalter/build.gradle index d12385c6442..38653501d0c 100644 --- a/apps/pdl-forvalter/build.gradle +++ b/apps/pdl-forvalter/build.gradle @@ -82,7 +82,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'ma.glasnost.orika:orika-core:1.5.4' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' diff --git a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java index b9709402bea..9b915bf11a9 100644 --- a/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java +++ b/apps/pdl-forvalter/src/main/java/no/nav/pdl/forvalter/config/SecurityConfig.java @@ -14,11 +14,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -27,11 +25,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/person-export-api/build.gradle b/apps/person-export-api/build.gradle index 7deb451efd3..16aba6a935e 100644 --- a/apps/person-export-api/build.gradle +++ b/apps/person-export-api/build.gradle @@ -71,7 +71,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java index 1b86e8a7e58..045222f358e 100644 --- a/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java +++ b/apps/person-export-api/src/main/java/no/nav/testnav/apps/personexportapi/config/SecurityConfig.java @@ -17,11 +17,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -30,11 +28,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/person-faste-data-service/build.gradle b/apps/person-faste-data-service/build.gradle index 3236c073810..e866845122d 100644 --- a/apps/person-faste-data-service/build.gradle +++ b/apps/person-faste-data-service/build.gradle @@ -72,7 +72,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/person-organisasjon-tilgang-service/build.gradle b/apps/person-organisasjon-tilgang-service/build.gradle index 79b413367dc..bb933c605ef 100644 --- a/apps/person-organisasjon-tilgang-service/build.gradle +++ b/apps/person-organisasjon-tilgang-service/build.gradle @@ -78,7 +78,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'com.fasterxml.jackson.datatype:jackson-datatype-jsr310:2.14.2' diff --git a/apps/person-search-service/build.gradle b/apps/person-search-service/build.gradle index 28d5453c90b..58e94c5dd64 100644 --- a/apps/person-search-service/build.gradle +++ b/apps/person-search-service/build.gradle @@ -82,7 +82,7 @@ dependencies { implementation 'ma.glasnost.orika:orika-core:1.5.4' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java index 52a68fe6a81..eeef554da19 100644 --- a/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java +++ b/apps/person-search-service/src/main/java/no/nav/registre/testnorge/personsearchservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/person-service/build.gradle b/apps/person-service/build.gradle index 68a1610e589..9fa2772665e 100644 --- a/apps/person-service/build.gradle +++ b/apps/person-service/build.gradle @@ -79,7 +79,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' diff --git a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java index b5ecb33c06c..778363e59c2 100644 --- a/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java +++ b/apps/person-service/src/main/java/no/nav/testnav/apps/personservice/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/profil-api/build.gradle b/apps/profil-api/build.gradle index 6eeaccbe6b3..34ca325cef8 100644 --- a/apps/profil-api/build.gradle +++ b/apps/profil-api/build.gradle @@ -69,7 +69,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.projectlombok:lombok' diff --git a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java index 8a6e556bfc7..5a7d19a31a3 100644 --- a/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java +++ b/apps/profil-api/src/main/java/no/nav/registre/testnorge/profil/config/SecurityConfiguration.java @@ -16,11 +16,9 @@ public class SecurityConfiguration { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/sykemelding-api/build.gradle b/apps/sykemelding-api/build.gradle index 6be64473e26..e569db0dca8 100644 --- a/apps/sykemelding-api/build.gradle +++ b/apps/sykemelding-api/build.gradle @@ -77,7 +77,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' implementation 'io.swagger.core.v3:swagger-annotations-jakarta:2.2.16' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'com.ibm.mq:mq-jms-spring-boot-starter:3.0.3' implementation 'org.springframework.kafka:spring-kafka' diff --git a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java index e63c8eaa0a5..67a7fdde906 100644 --- a/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java +++ b/apps/sykemelding-api/src/main/java/no/nav/registre/testnorge/sykemelding/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/synt-sykemelding-api/build.gradle b/apps/synt-sykemelding-api/build.gradle index 6fdcbb77c20..446e999e955 100644 --- a/apps/synt-sykemelding-api/build.gradle +++ b/apps/synt-sykemelding-api/build.gradle @@ -69,7 +69,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'no.nav.testnav.libs:testing' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java b/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java index 1c027783031..55de701547e 100644 --- a/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java +++ b/apps/synt-sykemelding-api/src/main/java/no/nav/testnav/apps/syntsykemeldingapi/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/synt-vedtakshistorikk-service/build.gradle b/apps/synt-vedtakshistorikk-service/build.gradle index 03d729173d4..c09ea723944 100644 --- a/apps/synt-vedtakshistorikk-service/build.gradle +++ b/apps/synt-vedtakshistorikk-service/build.gradle @@ -72,7 +72,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'com.google.guava:guava:31.0.1-jre' diff --git a/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java b/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java index 2d43f4134dd..09270479b87 100644 --- a/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java +++ b/apps/synt-vedtakshistorikk-service/src/main/java/no/nav/testnav/apps/syntvedtakshistorikkservice/config/SecurityConfig.java @@ -19,11 +19,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -32,11 +30,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/testnav-ident-pool/build.gradle b/apps/testnav-ident-pool/build.gradle index 3838054057c..30ddcbdda9b 100644 --- a/apps/testnav-ident-pool/build.gradle +++ b/apps/testnav-ident-pool/build.gradle @@ -102,7 +102,7 @@ dependencies { implementation 'ma.glasnost.orika:orika-core:1.5.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' testImplementation 'org.springframework.cloud:spring-cloud-contract-wiremock' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java index fe86aadcf1d..65c349d240f 100644 --- a/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java +++ b/apps/testnav-ident-pool/src/main/java/no/nav/testnav/identpool/config/SecurityConfig.java @@ -14,11 +14,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -27,11 +25,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/testnorge-bisys/build.gradle b/apps/testnorge-bisys/build.gradle index cc4d314239f..d3f93079513 100644 --- a/apps/testnorge-bisys/build.gradle +++ b/apps/testnorge-bisys/build.gradle @@ -81,7 +81,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.springdoc:springdoc-openapi-ui:1.6.15' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'com.squareup.okhttp3:okhttp:4.9.3' diff --git a/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java b/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java index e1257044a51..e93b6a24449 100644 --- a/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java +++ b/apps/testnorge-bisys/src/main/java/no/nav/registre/bisys/config/VaultConfig.java @@ -8,7 +8,7 @@ import org.springframework.vault.client.VaultEndpoint; import org.springframework.vault.config.AbstractVaultConfiguration; -import static io.micrometer.common.util.StringUtils.isBlank; +import static io.micrometer.core.instrument.util.StringUtils.isBlank; @Configuration @Profile("dev") diff --git a/apps/testnorge-statisk-data-forvalter/build.gradle b/apps/testnorge-statisk-data-forvalter/build.gradle index 7853b5ceb7d..5d8dcc6efd9 100644 --- a/apps/testnorge-statisk-data-forvalter/build.gradle +++ b/apps/testnorge-statisk-data-forvalter/build.gradle @@ -81,7 +81,7 @@ dependencies { implementation 'org.springframework.boot:spring-boot-starter-oauth2-client' implementation 'org.aspectj:aspectjweaver:1.9.19' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.postgresql:postgresql' implementation 'com.zaxxer:HikariCP' diff --git a/apps/testnorge-tp/build.gradle b/apps/testnorge-tp/build.gradle index a79a3106ab5..362799e7848 100644 --- a/apps/testnorge-tp/build.gradle +++ b/apps/testnorge-tp/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'jakarta.validation:jakarta.validation-api:3.0.2' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' diff --git a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java index 8be7ee97eeb..15df6a173cc 100644 --- a/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java +++ b/apps/testnorge-tp/src/main/java/no/nav/registre/tp/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/tilbakemelding-api/build.gradle b/apps/tilbakemelding-api/build.gradle index aa3a26bd6ed..4a2e5d87e65 100644 --- a/apps/tilbakemelding-api/build.gradle +++ b/apps/tilbakemelding-api/build.gradle @@ -64,7 +64,7 @@ dependencies { implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' implementation 'org.hibernate.validator:hibernate-validator' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' diff --git a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java index 300929642de..04efa45bc88 100644 --- a/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java +++ b/apps/tilbakemelding-api/src/main/java/no/nav/registre/testnorge/tilbakemeldingapi/config/SecurityConfig.java @@ -16,11 +16,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -29,11 +27,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/tps-messaging-service/build.gradle b/apps/tps-messaging-service/build.gradle index 0066acbe4ca..0a8111afa4c 100644 --- a/apps/tps-messaging-service/build.gradle +++ b/apps/tps-messaging-service/build.gradle @@ -104,7 +104,7 @@ dependencies { implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.aspectj:aspectjweaver:1.9.7' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java index 5661dc46047..8b7158389ad 100644 --- a/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java +++ b/apps/tps-messaging-service/src/main/java/no/nav/testnav/apps/tpsmessagingservice/config/SecurityConfig.java @@ -18,11 +18,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -31,11 +29,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/udi-stub/build.gradle b/apps/udi-stub/build.gradle index 36b8122e76e..e8574181e22 100644 --- a/apps/udi-stub/build.gradle +++ b/apps/udi-stub/build.gradle @@ -101,7 +101,7 @@ dependencies { implementation 'ma.glasnost.orika:orika-core:1.5.4' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'com.h2database:h2' diff --git a/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java b/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java index 0684b998fdc..1931e1181c7 100644 --- a/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java +++ b/apps/udi-stub/src/main/java/no/nav/udistub/config/SecurityConfig.java @@ -16,16 +16,20 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers("/api/**").fullyAuthenticated() - .anyRequest() - .permitAll() - .and() - .oauth2ResourceServer() - .jwt(); + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( + "/internal/**", + "/webjars/**", + "/swagger-resources/**", + "/v3/api-docs/**", + "/swagger-ui/**", + "/swagger", + "/error", + "/swagger-ui.html" + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/apps/varslinger-service/build.gradle b/apps/varslinger-service/build.gradle index bc840f3f05a..cafa62cf711 100644 --- a/apps/varslinger-service/build.gradle +++ b/apps/varslinger-service/build.gradle @@ -79,7 +79,7 @@ dependencies { implementation 'io.micrometer:micrometer-registry-prometheus' implementation 'org.springdoc:springdoc-openapi-starter-webmvc-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' diff --git a/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java b/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java index 8021f565f81..632c00da6d2 100644 --- a/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java +++ b/apps/varslinger-service/src/main/java/no/nav/registre/varslingerservice/config/SecurityConfig.java @@ -14,11 +14,9 @@ public class SecurityConfig { @Bean public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Exception { - httpSecurity.sessionManagement() - .sessionCreationPolicy(SessionCreationPolicy.STATELESS) - .and().csrf().disable() - .authorizeHttpRequests() - .requestMatchers( + httpSecurity.sessionManagement(sessionConfig -> sessionConfig.sessionCreationPolicy(SessionCreationPolicy.STATELESS)) + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeHttpRequests(authorizeConfig -> authorizeConfig.requestMatchers( "/internal/**", "/webjars/**", "/swagger-resources/**", @@ -27,11 +25,9 @@ public SecurityFilterChain filterChain(HttpSecurity httpSecurity) throws Excepti "/swagger", "/error", "/swagger-ui.html" - ).permitAll() - .requestMatchers("/api/**").fullyAuthenticated() - .and() - .oauth2ResourceServer() - .jwt(); + ).permitAll().requestMatchers("/api/**").fullyAuthenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })); return httpSecurity.build(); } diff --git a/examples/reactive-rest-example/build.gradle b/examples/reactive-rest-example/build.gradle index d5f9003c669..9975d1fa6ab 100644 --- a/examples/reactive-rest-example/build.gradle +++ b/examples/reactive-rest-example/build.gradle @@ -67,7 +67,7 @@ dependencies { runtimeOnly 'com.h2database:h2' implementation 'org.springdoc:springdoc-openapi-starter-webflux-ui:2.2.0' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'org.projectlombok:lombok' diff --git a/libs/servlet-security/build.gradle b/libs/servlet-security/build.gradle index ee5f5e82f03..7dd67f607ea 100644 --- a/libs/servlet-security/build.gradle +++ b/libs/servlet-security/build.gradle @@ -51,7 +51,7 @@ java { dependencies { implementation 'no.nav.testnav.libs:security-core' - implementation 'com.auth0:java-jwt:3.18.2' + implementation 'com.auth0:java-jwt:4.3.0' implementation 'org.springframework.boot:spring-boot-starter-oauth2-resource-server' implementation 'org.springframework.boot:spring-boot-starter-actuator' diff --git a/mocks/maskinporten-mock/build.gradle b/mocks/maskinporten-mock/build.gradle index d124cdf81ab..ada27c3078d 100644 --- a/mocks/maskinporten-mock/build.gradle +++ b/mocks/maskinporten-mock/build.gradle @@ -25,7 +25,7 @@ repositories { } dependencies { - implementation 'com.auth0:java-jwt:3.18.2' + implementation 'com.auth0:java-jwt:4.3.0' implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' diff --git a/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java b/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java index 868573c8d16..5602d2388ce 100644 --- a/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java +++ b/mocks/maskinporten-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java @@ -18,6 +18,6 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf().disable().build(); + return http.csrf(csrfSpec -> csrfSpec.disable()).build(); } } diff --git a/mocks/tokendings-mock/build.gradle b/mocks/tokendings-mock/build.gradle index 3fad3783972..5637016788b 100644 --- a/mocks/tokendings-mock/build.gradle +++ b/mocks/tokendings-mock/build.gradle @@ -25,7 +25,7 @@ repositories { } dependencies { - implementation 'com.auth0:java-jwt:3.18.2' + implementation 'com.auth0:java-jwt:4.3.0' implementation 'no.nav.testnav.libs:security-core' implementation 'no.nav.testnav.libs:reactive-core' diff --git a/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java b/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java index 868573c8d16..5602d2388ce 100644 --- a/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java +++ b/mocks/tokendings-mock/src/main/java/no/nav/testnav/mocks/tokendingsmock/config/SecurityConfig.java @@ -18,6 +18,6 @@ public class SecurityConfig { @Bean public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf().disable().build(); + return http.csrf(csrfSpec -> csrfSpec.disable()).build(); } } diff --git a/proxies/aareg-proxy/build.gradle b/proxies/aareg-proxy/build.gradle index 9f36ed3009a..b2c4ecf0f20 100644 --- a/proxies/aareg-proxy/build.gradle +++ b/proxies/aareg-proxy/build.gradle @@ -58,7 +58,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' implementation 'no.nav.testnav.libs:reactive-core' diff --git a/proxies/aareg-synt-services-proxy/build.gradle b/proxies/aareg-synt-services-proxy/build.gradle index 8c7fd711323..5901ec36a18 100644 --- a/proxies/aareg-synt-services-proxy/build.gradle +++ b/proxies/aareg-synt-services-proxy/build.gradle @@ -57,7 +57,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/arbeidsplassencv-proxy/build.gradle b/proxies/arbeidsplassencv-proxy/build.gradle index 639577c5759..4216c45427b 100644 --- a/proxies/arbeidsplassencv-proxy/build.gradle +++ b/proxies/arbeidsplassencv-proxy/build.gradle @@ -60,7 +60,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/arena-forvalteren-proxy/build.gradle b/proxies/arena-forvalteren-proxy/build.gradle index 954096f1327..037ee378ff2 100644 --- a/proxies/arena-forvalteren-proxy/build.gradle +++ b/proxies/arena-forvalteren-proxy/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/batch-adeo-proxy/build.gradle b/proxies/batch-adeo-proxy/build.gradle index 7bcbb305c60..280a6725cc7 100644 --- a/proxies/batch-adeo-proxy/build.gradle +++ b/proxies/batch-adeo-proxy/build.gradle @@ -58,7 +58,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/brregstub-proxy/build.gradle b/proxies/brregstub-proxy/build.gradle index 6d28b871ccc..7a1f8d002c3 100644 --- a/proxies/brregstub-proxy/build.gradle +++ b/proxies/brregstub-proxy/build.gradle @@ -60,7 +60,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/dokarkiv-proxy/build.gradle b/proxies/dokarkiv-proxy/build.gradle index c07ab063e44..8e4e2549bf3 100644 --- a/proxies/dokarkiv-proxy/build.gradle +++ b/proxies/dokarkiv-proxy/build.gradle @@ -57,7 +57,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/ereg-proxy/build.gradle b/proxies/ereg-proxy/build.gradle index c6e486eba0e..72b1b082259 100644 --- a/proxies/ereg-proxy/build.gradle +++ b/proxies/ereg-proxy/build.gradle @@ -60,7 +60,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/histark-proxy/build.gradle b/proxies/histark-proxy/build.gradle index f66ce715015..1d5af9ca7f7 100644 --- a/proxies/histark-proxy/build.gradle +++ b/proxies/histark-proxy/build.gradle @@ -60,7 +60,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/hodejegeren-proxy/build.gradle b/proxies/hodejegeren-proxy/build.gradle index d71e1cd0d4a..d75e596c6b7 100644 --- a/proxies/hodejegeren-proxy/build.gradle +++ b/proxies/hodejegeren-proxy/build.gradle @@ -61,7 +61,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' implementation 'org.springframework.cloud:spring-cloud-starter-bootstrap' // TODO remove legacy bootstrap config - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/inntektstub-proxy/build.gradle b/proxies/inntektstub-proxy/build.gradle index b37322b86ae..6662fd56e8b 100644 --- a/proxies/inntektstub-proxy/build.gradle +++ b/proxies/inntektstub-proxy/build.gradle @@ -60,7 +60,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/inst-proxy/build.gradle b/proxies/inst-proxy/build.gradle index c3d1c656237..66876700c2a 100644 --- a/proxies/inst-proxy/build.gradle +++ b/proxies/inst-proxy/build.gradle @@ -60,7 +60,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'junit:junit:4.13.2' //TODO upgrade to JUnit5 diff --git a/proxies/kodeverk-proxy/build.gradle b/proxies/kodeverk-proxy/build.gradle index 5dd27983cdc..b4a5df2219d 100644 --- a/proxies/kodeverk-proxy/build.gradle +++ b/proxies/kodeverk-proxy/build.gradle @@ -61,7 +61,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/kontoregister-person-proxy/build.gradle b/proxies/kontoregister-person-proxy/build.gradle index a66ba18c92c..ae109ad3f9b 100644 --- a/proxies/kontoregister-person-proxy/build.gradle +++ b/proxies/kontoregister-person-proxy/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/krrstub-proxy/build.gradle b/proxies/krrstub-proxy/build.gradle index df66faf55d1..49b0120b22d 100644 --- a/proxies/krrstub-proxy/build.gradle +++ b/proxies/krrstub-proxy/build.gradle @@ -61,7 +61,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/medl-proxy/build.gradle b/proxies/medl-proxy/build.gradle index c3db2d244cd..3f2830e4e64 100644 --- a/proxies/medl-proxy/build.gradle +++ b/proxies/medl-proxy/build.gradle @@ -61,7 +61,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/norg2-proxy/build.gradle b/proxies/norg2-proxy/build.gradle index 0c4986523e3..68b9fac5db6 100644 --- a/proxies/norg2-proxy/build.gradle +++ b/proxies/norg2-proxy/build.gradle @@ -54,7 +54,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/pdl-proxy/build.gradle b/proxies/pdl-proxy/build.gradle index ca090468a17..a6f748658c8 100644 --- a/proxies/pdl-proxy/build.gradle +++ b/proxies/pdl-proxy/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/pensjon-testdata-facade-proxy/build.gradle b/proxies/pensjon-testdata-facade-proxy/build.gradle index d798e0dd8a1..cad2b347def 100644 --- a/proxies/pensjon-testdata-facade-proxy/build.gradle +++ b/proxies/pensjon-testdata-facade-proxy/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/saf-proxy/build.gradle b/proxies/saf-proxy/build.gradle index bd9ca319e31..8710643120b 100644 --- a/proxies/saf-proxy/build.gradle +++ b/proxies/saf-proxy/build.gradle @@ -62,7 +62,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/sigrunstub-proxy/build.gradle b/proxies/sigrunstub-proxy/build.gradle index 05dbdac524d..8961bf348d4 100644 --- a/proxies/sigrunstub-proxy/build.gradle +++ b/proxies/sigrunstub-proxy/build.gradle @@ -59,7 +59,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-vault-config' implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/skjermingsregister-proxy/build.gradle b/proxies/skjermingsregister-proxy/build.gradle index d3130addf59..b4e2d4f8539 100644 --- a/proxies/skjermingsregister-proxy/build.gradle +++ b/proxies/skjermingsregister-proxy/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/statisk-data-forvalter-proxy/build.gradle b/proxies/statisk-data-forvalter-proxy/build.gradle index d6debe1d77e..aed1fd224a4 100644 --- a/proxies/statisk-data-forvalter-proxy/build.gradle +++ b/proxies/statisk-data-forvalter-proxy/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/synthdata-meldekort-proxy/build.gradle b/proxies/synthdata-meldekort-proxy/build.gradle index 25aee316723..6e6c5603b08 100644 --- a/proxies/synthdata-meldekort-proxy/build.gradle +++ b/proxies/synthdata-meldekort-proxy/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/tps-forvalteren-proxy/build.gradle b/proxies/tps-forvalteren-proxy/build.gradle index f94b5026416..e6cf500a0bb 100644 --- a/proxies/tps-forvalteren-proxy/build.gradle +++ b/proxies/tps-forvalteren-proxy/build.gradle @@ -67,7 +67,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' diff --git a/proxies/udistub-proxy/build.gradle b/proxies/udistub-proxy/build.gradle index 05ed5e945fc..941365c9eac 100644 --- a/proxies/udistub-proxy/build.gradle +++ b/proxies/udistub-proxy/build.gradle @@ -63,7 +63,7 @@ dependencies { implementation 'org.springframework.cloud:spring-cloud-starter-gateway' - implementation 'net.logstash.logback:logstash-logback-encoder:7.3' + implementation 'net.logstash.logback:logstash-logback-encoder:7.4' implementation 'org.hibernate.validator:hibernate-validator' testImplementation 'org.springframework.boot:spring-boot-starter-test' From f5dbe8e61145f344c83c24b227b9a3c457716468 Mon Sep 17 00:00:00 2001 From: stigus Date: Tue, 17 Oct 2023 14:43:27 +0200 Subject: [PATCH 18/18] Spring oppdatering og securityconfig refaktor for reactive-proxy --- apps/arbeidsforhold-export-api/build.gradle | 2 +- apps/brreg-stub/build.gradle | 2 +- .../build.gradle | 2 +- apps/testnorge-bisys/build.gradle | 2 +- .../reactiveproxy/config/SecurityConfig.java | 32 +++++++++---------- 5 files changed, 19 insertions(+), 21 deletions(-) diff --git a/apps/arbeidsforhold-export-api/build.gradle b/apps/arbeidsforhold-export-api/build.gradle index 7231e082a53..821f8ee47a8 100644 --- a/apps/arbeidsforhold-export-api/build.gradle +++ b/apps/arbeidsforhold-export-api/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.6" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/brreg-stub/build.gradle b/apps/brreg-stub/build.gradle index 460fc4d7a7f..ff8c4b11ebe 100644 --- a/apps/brreg-stub/build.gradle +++ b/apps/brreg-stub/build.gradle @@ -3,7 +3,7 @@ plugins { id "org.sonarqube" version "4.0.0.2929" id "uk.co.boothen.gradle.wsimport" version "0.17" id 'com.ewerk.gradle.plugins.jaxb2' version '1.0.10' - id 'org.springframework.boot' version "2.7.5" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/oppsummeringsdokument-service/build.gradle b/apps/oppsummeringsdokument-service/build.gradle index 2fdead33ea3..5787c75ec81 100644 --- a/apps/oppsummeringsdokument-service/build.gradle +++ b/apps/oppsummeringsdokument-service/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "3.0.6" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/apps/testnorge-bisys/build.gradle b/apps/testnorge-bisys/build.gradle index d3f93079513..acd0d11c38d 100644 --- a/apps/testnorge-bisys/build.gradle +++ b/apps/testnorge-bisys/build.gradle @@ -1,7 +1,7 @@ plugins { id 'java' id "org.sonarqube" version "4.0.0.2929" - id 'org.springframework.boot' version "2.7.5" + id 'org.springframework.boot' version "3.1.4" id 'io.spring.dependency-management' version "1.1.3" id "jacoco" } diff --git a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java index 56dae870a22..60ad2638f69 100644 --- a/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java +++ b/libs/reactive-proxy/src/main/java/no/nav/testnav/libs/reactiveproxy/config/SecurityConfig.java @@ -1,6 +1,8 @@ package no.nav.testnav.libs.reactiveproxy.config; import lombok.RequiredArgsConstructor; +import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration; +import no.nav.testnav.libs.reactivesecurity.manager.JwtReactiveAuthenticationManager; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Import; @@ -9,9 +11,6 @@ import org.springframework.security.config.web.server.ServerHttpSecurity; import org.springframework.security.web.server.SecurityWebFilterChain; -import no.nav.testnav.libs.reactivesecurity.config.SecureOAuth2ServerToServerConfiguration; -import no.nav.testnav.libs.reactivesecurity.manager.JwtReactiveAuthenticationManager; - @Configuration @EnableWebFluxSecurity @@ -23,21 +22,20 @@ public class SecurityConfig { private final JwtReactiveAuthenticationManager jwtReactiveAuthenticationManager; @Bean - public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity http) { - return http.csrf().disable() - .authorizeExchange() - .pathMatchers( - "/swagger-ui.html", + public SecurityWebFilterChain springSecurityFilterChain(ServerHttpSecurity httpSecurity) { + return httpSecurity + .csrf(csrfSpec -> csrfSpec.disable()) + .authorizeExchange(authorizeConfig -> authorizeConfig.pathMatchers( + "/internal/**", "/webjars/**", + "/swagger-resources/**", "/v3/api-docs/**", - "/internal/isReady", - "/internal/isAlive", - "/internal/status" - ).permitAll() - .anyExchange().authenticated() - .and() - .oauth2ResourceServer() - .jwt(spec -> spec.authenticationManager(jwtReactiveAuthenticationManager)) - .and().build(); + "/swagger-ui/**", + "/swagger", + "/error", + "/swagger-ui.html" + ).permitAll().anyExchange().authenticated()) + .oauth2ResourceServer(oauth2RSConfig -> oauth2RSConfig.jwt(jwtConfigurer -> { + })).build(); } }