From bfb71fdbd7346de1aeb5a4a5e4887eff90a80ce8 Mon Sep 17 00:00:00 2001 From: Sebastian Veit Date: Thu, 25 Jun 2026 18:28:33 +0200 Subject: [PATCH] fix: add spring-core test dependency for spring-security-crypto 7.x spring-security-crypto 7.1.0's AbstractValidatingPasswordEncoder#matches references org.springframework.util.StringUtils (in spring-core), which spring-security-crypto declares as an optional dependency. Gradle therefore does not resolve it transitively, so the class is absent from the test classpath and every SpringSecurityIntegrationTest case fails on a clean dependency resolution with NoClassDefFoundError (as seen in CI). Add spring-core 7.0.8 (the Spring Framework 7.0.x line that Spring Security 7.1.0 targets) to the test classpath. Signed-off-by: Sebastian Veit --- build.gradle.kts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.gradle.kts b/build.gradle.kts index 19ea8a8..7f3a779 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -33,6 +33,9 @@ dependencies { // Integration test dependencies testImplementation("org.bouncycastle:bcprov-jdk18on:1.84") testImplementation("org.springframework.security:spring-security-crypto:7.1.0") + // Provides org.springframework.util.StringUtils (optional dep of spring-security-crypto 7.x); + // Spring Framework 7.0.x is the line Spring Security 7.1.0 targets. + testImplementation("org.springframework:spring-core:7.0.8") testImplementation("commons-logging:commons-logging:1.4.0") }