diff --git a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizingFunction.java b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizingFunction.java index d4c8e33f7e0a..ccbed309c224 100644 --- a/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizingFunction.java +++ b/spring-boot-project/spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SanitizingFunction.java @@ -79,8 +79,8 @@ default SanitizableData applyUnlessFiltered(SanitizableData data) { * @see #filter() * @see #sanitizeValue() */ - default SanitizingFunction ifLikelySenstive() { - return ifLikelyCredential().ifLikelyUri().ifLikelySenstiveProperty().ifVcapServices(); + default SanitizingFunction ifLikelySensitive() { + return ifLikelyCredential().ifLikelyUri().ifLikelySensitiveProperty().ifVcapServices(); } /** @@ -121,7 +121,7 @@ default SanitizingFunction ifLikelyUri() { * @see #filter() * @see #sanitizeValue() */ - default SanitizingFunction ifLikelySenstiveProperty() { + default SanitizingFunction ifLikelySensitiveProperty() { return ifKeyMatches("sun.java.command", "^spring[._]application[._]json$"); } diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizerTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizerTests.java index db4a8317d446..72e04d78ecbc 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizerTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizerTests.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2023 the original author or authors. + * Copyright 2012-2025 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -95,7 +95,7 @@ void overridingDefaultSanitizingFunction() { @Test void overridingDefaultSanitizingFunctionWithFiltered() { - Sanitizer sanitizer = new Sanitizer(List.of(SanitizingFunction.sanitizeValue().ifLikelySenstive())); + Sanitizer sanitizer = new Sanitizer(List.of(SanitizingFunction.sanitizeValue().ifLikelySensitive())); SanitizableData other = new SanitizableData(null, "other", "123456"); SanitizableData password = new SanitizableData(null, "password", "123456"); assertThat(sanitizer.sanitize(other, true)).isEqualTo("123456"); diff --git a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizingFunctionTests.java b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizingFunctionTests.java index 4cd23f87facf..dabeceb25087 100644 --- a/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizingFunctionTests.java +++ b/spring-boot-project/spring-boot-actuator/src/test/java/org/springframework/boot/actuate/endpoint/SanitizingFunctionTests.java @@ -57,8 +57,8 @@ void applyUnlessFilteredWhenHasFilterTestingFalseReturnsUnfiltered() { } @Test - void ifLikelySenstiveFiltersExpected() { - SanitizingFunction function = SanitizingFunction.sanitizeValue().ifLikelySenstive(); + void ifLikelySensitiveFiltersExpected() { + SanitizingFunction function = SanitizingFunction.sanitizeValue().ifLikelySensitive(); assertThat(function).satisfies(this::likelyCredentialChecks, this::likelyUriChecks, this::likelySenstivePropertyChecks, this::vcapServicesChecks); } @@ -101,8 +101,8 @@ private void likelyUriChecks(SanitizingFunction function) { } @Test - void ifLikelySenstivePropertyFiltersExpected() { - SanitizingFunction function = SanitizingFunction.sanitizeValue().ifLikelySenstiveProperty(); + void ifLikelySensitivePropertyFiltersExpected() { + SanitizingFunction function = SanitizingFunction.sanitizeValue().ifLikelySensitiveProperty(); assertThat(function).satisfies(this::likelySenstivePropertyChecks); } diff --git a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json index 518625fd49db..eb6aff175ac9 100644 --- a/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json +++ b/spring-boot-project/spring-boot/src/main/resources/META-INF/additional-spring-configuration-metadata.json @@ -309,7 +309,7 @@ { "name": "logging.structured.json.stacktrace.printer", "type": "java.lang.String", - "description": "Name of the printer to use. Can be 'standard', 'logging-system', or the fully-qualified class name of a StackTracePrinter. When not specified 'logging-system' or 'standard' will be used depening if other properties are set." + "description": "Name of the printer to use. Can be 'standard', 'logging-system', or the fully-qualified class name of a StackTracePrinter. When not specified 'logging-system' or 'standard' will be used depending if other properties are set." }, { "name": "logging.structured.json.stacktrace.root",